The Model 4P ■ model
The Videotex Information System
Fort Worth Scene
AND THIS MONTH'S NEW COMPUTER IS . . .
Although a new computer is not in reality introduced
every month, lately it seems to be a regular occurrence. And
since we seem to be on a roll, the versatile, transportable
Model 4P is described in this issue.
THE VIDEOTEX AND OFFICE INFORMATION
SYSTEM (VIS)
You'll notice that we've devoted several pages to the
new VIS system. This is a tremendous data base system that
can be set up and customized to fit information storage,
retrieval, and distribution needs. It is a most impressive and
forgiving system. It will even accept misspelled words, evalu-
ate them phonetically and return what the user actually meant
to ask for in the first place. VIS is a very sophisticated system
which demonstrates forcibly the strength of today's TRS-80
microcomputer.
THE BUSINESS GRAPHICS ANALYSIS PAK
The Business Graphics Analysis Pak for the Models II,
12, and 16 (in Model II mode) and Models III and 4 (in the
Model III mode) offers very high resolution printouts, Graphs
and charts can now be printed using the Bit Image Mode on
the Radio Shack dot matrix printers which include this capa-
bility. The article on this package includes some stunning and
highly detailed printouts created using this piece of software.
MUSIC MAESTRO!
Musical Notes is a new column that we're introducing
this month. It comes to us from Bryan Eggers of Software
Affair, Ltd. Bryan will be discussing the capabilities of a musi-
cal option for your 16K Model III or Model 4 — Orchestra 90,
This package can change your computer into a music syn-
thesizer capable of playing more complicated music than is
"humanly" possible. You can compose or transcribe with the
powerful music programming language, and you don't even
have to be a musician to do all this (although it helps),
AND SO MUCH MORE
From the education group comes a review on two new
packages— Corplan and the Illustrated Computer. Corplan
lets you play the corporate game to test and hone your
survival skills. Corplan is intended as a supplement to busi-
ness instruction at the college level or advanced secondary
level. The Illustrated Computer can help secondary and col-
lege students "... learn the fundamentals of machine lan-
guage programming" on a 32K Color Computer with
Extended Color BASIC and disk.
Customer Services sets up some ground rules and
game rules for solving a system integration problem in a
hypothetical situation. Ivan Sygoda is back with his twelfth
article in his series of how to Profile articles. CompuServe and
AghStar also return this issue with timely information on using
their services. Al and Dru Simon respond to frequently asked
questions about Bulletin Boards in their column, Communi-
cations Corner.
From our readers we have several items of interest in-
cluding Yorrick's Escape which is a game for the Model III,
instructions for moving data between the Model 1 00 and the
Model III, and a tutorial on using SVCs on the Model II.
For Model 100 users we're publishing Model 100 ROM
locations in as complete a form as we've been able to get
them. JQ
MAGAZINES
Below are five magazines of special interest to TRS-80
owners that we believe have editorial content of high quality
and will be of use to our customers.
Basic Computing— The TRS-80
User Journal (Name change for
80 US Journal — covers all TRS-80's)
3838 South Warner Street
Tacoma, WA 98409
(206)475-2219
Color Computer Magazine
Highland Hill
Camden, ME 04843
(207)236-9621
Color Computer Weekly
P.O. Box 1355
Boston, MA 02205
Rainbow (Covers the TRS-80 Color Computer)
P.O. Box 209
Prospect KY 40059
(502)228-4492
two/sixteen magazine
P.O. Box 1216
Lancaster, PA 17603
(717)397-3364 -D
TRS-80 Microcomputer News, November 1983
TRS-80 Microcomputer News
Volume 5 Issue 1 1
NOVEMBER 1983
TRS-80 Microcomputer News is published monthly
by Radio Shack, a division of Tandy Corporation, One Tandy
Center, Fort Worth, Texas U.S.A. 76102, Copyright 1983 by
Tandy Corporation, One Tandy Center, Fort Worth, Texas
USA, 76102, All rights reserved.
Reproduction or use, without express written permission
from Tandy Corporation, of any portion of the Microcomputer
News is prohibited. Permission is specifically granted to individ-
uals to use or reproduce material for their personal, non-
commercial use. Reprint permission for all material (other than
Ivan Sygoda's Profile article), with notice of source, is also
specifically granted to non-profit clubs, organizations, educa-
tional institutions, and newsletters.
TRS-80 Microcomputer News is published monthly by
Radio Shack, a division of Tandy Corporation. A single six
month subscription is available free to purchasers of new full
size TRS-80 Microcomputer systems with addresses in the
United States, Puerto Rico, Canada and APO or FPO ad-
dresses. Certain smaller TRS-80 Microcomputers will not in-
clude this free subscription. Subscriptions to other addresses
are not available.
The subscription rate for renewals and other interested
persons with U.S., APO or FPO addresses is twelve dollars
($12.00) per year, check or money order. Single copies of the
Microcomputer News may be purchased from Radio Shack
Computer Centers or Computer Departments for $1.50 sug-
gested retail each
The subscription rate for renewals and other interested
persons with Canadian addresses is Fifteen dollars ($1 5,00) per
year, check or money order in U.S. funds All correspondence
related to subscriptions should be sent to: Microcomputer
News, PO. Box 2910, Fort Worth, Texas 76113-2910
Retail Prices in this newsletter may vary at individual stores
and dealers. The company cannot be liable for pictorial and
typographical inaccuracies.
Back issues of Microcomputer News prior to January, 1 981
are available through your local Radio Shack store as stock
number 26-2115 (Suggested Retail Price $4.95 for the set).
Back issues of 1981 copies are available as stock number 26-
2240 (Suggested Retail Price $9,95 for the set).
The TRS-80 Newsletter welcomes the receipt of computer
programs, or other material which you would like to make avail-
able to users of TRS-80 Microcomputer systems. In order for us
to reprint your submission, you must specifically request that
your material be considered for reprinting in the newsletter and
provide no notice that you retain copyrights or other exclusive
rights in the material. This assures that our readers may be
permitted to recopy and use your material without creating any
legal hassles.
Material for publication should be submitted on magnetic
media (tape, disk, or CompuServe), If you submit material on
tape or disk, and it is accepted for publication, we will send you
two cassettes or diskettes for each one you sent us. Cassettes
will come from our box of mixed blank cassettes. If you submit
material on CompuServe, and we think we may use the mate-
rial, we will extend your Microcomputer News subscription by
six months for each article accepted. If you are submitting
material over CompuServe, please include your name and ad-
dress or your subscription number so we can find you. If the
material is very short, send it to us in E-Mail. If you have more
than a few lines, you need to place the material in the ACCESS
area of CompuServe and then let us know it is there by leaving a
message on E-Mail.
Material may be submitted by mail to P.O. Box 2910, Fort
Worth, Texas 76113-2910, or through CompuServe, The
Microcomputer News' CompuServe user ID number is
70007,535.
Programs published in the Microcomputer News are pro-
vided as is, for your information. While we make reasonable
efforts to ensure that the programs we publish here work as
specified, Radio Shack can not assume any liability for the
accuracy either of the programs themselves or of the results
provided by the programs.
Further, while Microcomputer News is a product of Radio
Shack, the programs and much of the information published
here are not Radio Shack products, and as such can not be
supported by our Computer Customer Service group. If you
have questions about a program in the Microcomputer News,
your first option is to write directly to the author of the program.
When possible, we are now including author's addresses to
facilitate communications. If the address is not published, or if
you are not happy with the response you get, please write us
here at Microcomputer News. We will try (given the limited size
of our staff) to find an answer to your question and, in many
cases, will publish the answer in an up-coming issue of Micro-
computer News.
Trademark Credits
CompuServe™
CP/M®
Dow Jones™
NEWS/RETRIEVAL
Service®
LDOS™
VisiCalc®
XENIX™
Program Pak™
SCRIPSIT™
TRSDOS™
TRS-80®
CompuServe, Inc.
Digital Research
Dow Jones & Co., Inc.
Logical Systems, Inc.
VisiCorp, Inc.
Microsoft
Tandy Corporation
Tandy Corporation
Tandy Corporation
Tandy Corporation
Contents:
Color Computer
Programs
Calculating Ohms, Volts, and Watts by Larry Gurley 49
Color Math by Peter W Smyth 51
Definition Quiz by Jeff Coburn 52
Density by James W. Wood 53
Hardy Weinberg Equilibrium by Mark L. Fleischman 48
Plotting Ratios by Wayne Johnson 50
Communications Corner by Al and Dru Simon 21
Computer Customer Service 9
System Integration
Data Bases
AgriStar 19
New Tool for Midwestern Farmers by Thomas D. Deffke
CompuServe 33
Computers in Hotel/Motel Rooms A Traveler's Best Friend
Profile 4
Profile User's Mailbag
Education
Corplan Means Business by Patrick Dryden 6
Illustrated Machine Language Programming 17
Fort Worth Scene 2
General Interest
Business Graphics Analysis Pak-Added Support, New Features 37
VIS-Videotex and Office Information System 26
Model I/III/4
Converting Programs from Model III Disk BASIC to Model 4 Disk BASIC by Randy Rife 24
The Model 4 Portable Computer by Linda Miller 35
Musical Notes by Bryan Eggers 42
Programs
Yorrick's Escape by Brian Mullen 11
Model 11/12/16
The Assembly Is Getting Out of Hand, Call the Supervisor by Jean-Pierre Radley 39
Keysort-A Modified Quicksort for the Models 11/12 by Joey Rodrigue 47
Minimum Scripsit 2.0 Diskettes by George Berman 36
Writing Postcards and Labels Via the Model 11/12 by Ron Kuris 36
Model 100
Model 1 00 ROM Routines 44
Transferring Data Between the Model 100 and the Model III 25
Pocket Computer
PC-2 Diagnostic Tests 20
Prices shown in TRS-80 MICROCOMPUTER NEWS are in U.S. Funds.
TRS-80 Microcomputer News, November 1983
Profile
Profile Users' Mailbag
The Small Computer Company
P.O. Box 2910
Fort Worth, TX 76113-2910
By Ivan Sygoda, Director, Pentacle
Copyright 1983, Ivan Sygoda. All rights reserved.
Readers have been writing in steadily to describe their
experiences with Profile and ask questions about what the
program can and can't do. Their uses have been incredibly
diverse, from compilations of marriage records to jewelry
store billing; from real estate tax bills to automobile mainte-
nance records. Most users have been more than pleased
with Profile's power and flexibility, but a few have encoun-
tered frustrations. This month we'll focus on one particularly
interesting letter and review some of the principal sources of
his confusion.
READ THE MANUAL
Many problems could be avoided if only everyone would
study the manual beforehand. I understand fully, from per-
sonal experience, that this is much easier said than done.
You're impatient to get started, and then, computer manuals
will never win Nobel prizes for literature. But Profile is an
efficient and well-organized structure designed to accom-
plish certain tasks. Its various parts relate to each other and
work together. This means that decisions you make when you
define files will have an impact on what you can and can't do
when the time comes to print labels and reports. If there are
special ways you want to use output, these must be consid-
ered when you define your files. And so you have to plan
ahead in very specific ways.
Using Profile involves two kinds of activities. One kind is
already familiar to you, and involves your normal business
procedures— looking up information, writing reports, doing
mailings, and so forth— all of which Profile lets you carry out
efficiently. But in order to accomplish these routine tasks, you
first must complete an unusual, unfamiliar procedure: creat-
ing your data base. Since this is not a routine activity, a special
effort is required to do it well.
Actually, defining files is not difficult at all. Or more pre-
cisely, the mechanics of defining files is quite easy, and it goes
quickly. However, the choice of fields is completely depen-
dent upon your own unique application. Only you can know
exactly what you want. Here's a parallel: a word processing
program makes it easy to manipulate words on a screen. The
manual is an effective guide, showing you what to do. But no
one at Radio Shack can tell you what to say in your letter or
how to phrase it. The same thing in this case: the Profile
manual and these articles give you hints and tips, suggest
uses for special fields, enumerate tricks of the trade and warn
against common mistakes. But only you know your data
fields and the way they relate to each other. Profile gives you
almost infinite possibilities. This is not always an easy situation
with which to deal.
TAKEN TO TASK
The user who criticized Profile III Plus most severely was
Mr. Henry H. Herrdegen of Windsor, Ontario: "First off, lots of
little things I found annoying and confusing: Some prompts
require (key) and [enter) , others only (key) . Some
commands (selections) switch to 'cap', some not, [with] no
indication if lower case or capital [is necessary]. When work-
ing on a file and switching between CM (Creation Menu) and
RM (Runtime Menu), or any menu choice, one has to enter
the filename X times and stare at the software company
advert for endless seconds. More serious is the fact that the
'Define Files' [program] has no edit feature other than killing
everything [after the field you want to change], and no way to
change length of segments. It is so darn easy to make an
error in the design of the field lengths! Generally, the pa-
perwork required to come up with a functioning screen and
file is too involved without having the opportunity to try it on
the computer."
To begin with, I'd like to thank Mr. Herrdegen for writing
such a detailed and thoughtful letter, of which this is just an
excerpt. I too have puzzled over the points he raises, and I'd
like to discuss each of them.
Any applications program that's written for a particular
computer uses that computer's operating system as a base.
Profile (as well as SCRIPSIT, VisiCalc, and the other programs
you buy at Radio Shack) uses TRSDOS, the Tandy Radio
Shack Disk Operating System. Indeed, if such standardized
operating systems did not exist, programmers would be
forced to write their own driver routines for disk access,
screen display, input/output, and all the rest. As a result,
you'd have to pay at least two or three times as much for each
program, and worse, there would be chaos.
GIVE AND TAKE
As always in life, you win a little and you lose a little. In this
case, you gain a great deal of power and flexibility at low cost,
but unfortunately, you must endure the peculiarities of your
computer's operating system. TRSDOS, for instance, insists
that all commands be in upper case letters only. Thus, certain
information that you pass to Profile, such as file names and
passwords, must be in caps because Profile then passes this
information on to TRSDOS for processing. On the other hand,
data that Profile itself processes, such as search strings, can
be in upper or lower case.
Not all commands are of equal length. File names, for
instance, can be anywhere from one to eight characters long.
And so TRSDOS needs to be told that the user has completed
the keyboard entry. The most common way of doing this is to
TRS-80 Microcomputer News, November 1983
press the [enter] key. However, many Profile selections
(such as screen number) are of fixed length; for convenience
and speed of operation, the authors have, in most instances,
removed the need to also hit (enter) . What appears to be
an inconsistency is really logical and efficient. You just have to
get used to it.
Yes, it is a major nuisance to keep entering your file name
when moving among the various components of the Profile
system. But there is a good reason for this and a good
solution. The Profile creation and runtime programs are ca-
pable of supporting as many different data bases as you care
to create— within the limits of disk space, of course. Profile
needs to know which one you're working with or switching to.
You can avoid typing and retyping the file name by creating
user menus that pass these keystrokes to Profile automati-
cally. (Profile III Plus user menus were discussed in this
column in the December, 1 982, Microcomputer News. If you
don't have access to a copy, send us a note and we'll be
happy to send you a reprint.) User menus also make the
copyright notice go away quickly. The notice is required to
protect the rights of the program's authors; it is not an
advertisement.
No, Profile as you purchase it from Radio Shack does not
allow you to shuffle your fields extensively after you've fin-
ished defining them and entered data. One solution is to
leave extra bytes in each segment, especially the key seg-
ment, for later additions. More radical reshuffling of fields can
be accomplished in BASIC. A sample program was part of
the August 1983 column. Again, send us a note if you need
a reprint.
BACK TO SQUARE ONE
Mr. Herrdegen's last point brings me back to my first one.
You are simply not likely to design the most useful and flexible
data base for your application unless you do the planning
and paperwork beforehand. I cannot stress the importance
of planning extensively— it's worth all the time and trouble.
Read the sections on reports, labels, math formulas, user
indexes, and user menus in the manual carefully before you
define your fields.
Studying the descriptions of these functions does two
things: (1) It enables you to anticipate any restrictions (the
lengths of report lines, for example) so that you can work
around them; and (2) it makes you aware of opportunities that
you can take advantage of. Here's one small example: The
"date of last update" field can be very useful. You can use it to
isolate recent customers, update only those index or Rolodex
cards which require revision, or check entries made by office
temps. But, if you don't study the manual, you won't know
that such a resource is available to you. Previous Microcom-
puter News columns are full of similar suggestions. A list of
the first year's articles can be found below. Try your local
Radio Shack for back issues. If that doesn't work, again, we'll
be glad to send you reprints.
IN CONCLUSION
In my opinion, planning your whole Profile system out on
paper (fields, field lengths, screen, report and label formats)
is a prerequisite if you want satisfying results. When you've
devised a satisfactory data base, you should then test it with a
dozen or two dozen sample records. Try out the various sort
and select options and your screen and printer formats. Enter
extreme numbers to put your math formulas through their
paces. Sleep on it; a brilliant formatting idea may come to you
in the middle of the night. Let any colleagues who will use the
system or its output have a chance to react to its design.
Then, when you're sure you have the system you want, go
ahead and enter your hundreds or thousands of records.
And for the sanity of everyone concerned, keep good
backups!
PREVIOUS PROFILE ARTICLES
Thousands of people buy Radio Shack computers and
Profile each month, so there are many new users and readers
who don't have access to the (ahem!) wisdom we've been
sharing for over a year. Until Tandy publishes the yearly
Microcomputer News reprints collection, we'll be glad to
send you reprints of whichever of the following articles you
might find useful. Add a note about which version you are
using and what you are using it for. If you want to describe a
problem you're having, send a listing of your fields, any math
formulas, and a sample page of output.
Oct. '82: "Profile III + , the Flexible Data Base Manage-
ment System"
Nov. '82: "Optimizing Storage Capacity"
Dec. '82: "User Menus and Build Files"
Jan. '83: "Designing Codes"
Feb. '83: "Math Appeal"
Mar. '83: "Profile III h- and Your Printer"
Apr. '83: "The Nature of Associated Fields"
Jun. '83: "At Home with Profile"
Jul. '83: "Accessing Profile Data from BASIC"
Aug. '83: "Restructuring Profile Data Bases"
Sep. '83: "Prosort: A New Profile Enhancement"
Oct. '83: "Profile and the Model 100"
Upcoming articles will focus on interfacing Profile and
VisiCalc/Multiplan and merging Profile with SCRIPSIT
documents.
PROFILE Editor's Note: This is Mr. Sygoda's thirteenth
article in a series of 'how-to' Profile articles. Other articles in
the series will be published over the next few issues in this
column. We hope that you enjoy this feature, and we look
forward to your comments and questions on Profile.
Pentacle is a New York City-based non-profit service
organization specializing in administrative services for per-
forming art groups. JH
TRS-80 Microcomputer News, November 1983 5
Education
Corplan Means Business
by Patrick Dryden
Radio Shack's new Corplan courseware package is de-
signed to supplement business instruction at the college and
advanced secondary level. Corplan puts the player or a role-
playing management team in charge of an imaginary corpo-
ration for up to 12 quarters, unless bankruptcy comes first.
The player or team of players must plan overall business
strategy and apply the quarterly decisions for production,
sales, investments, and finance needed to make the corpora-
tion succeed. This educational program is so realistic that it's
bound to appear as often on the TRS-80 screens of business
people, armchair entrepreneurs, and those who enjoy busi-
ness gaming.
COMPUTER SIMULATION
Corplan is a complex mathematical model that simulates
the operations of a corporation on the TRS-80 Model III or
Model 4 (in Model III mode). Because this simulation is so
thorough, a minimum of 48K memory is required for
Corplan's data files and programs: CORGAME, the actual
simulation program, and CORAID, an auxiliary planning pro-
gram. Although Corplan assumes some familiarity with basic
business concepts, no computer experience is needed to run
the simulation. Corplan's menu-driven programs provide in-
formation and planning aids whenever needed. Best of all,
Corplan performs the simulation's tedious calculations and
maintains each quarter's accounts.
Reports can be selected from the menu to provide the
necessary planning information: the parameters of the world
in which the corporation operates; quarterly rates, prices,
and market factors; the current condition of the corporation;
and financial and operational forecasts. Figure 1 , for exam-
ple, shows a forecast of committed expenditures for the next
quarter and the amount of space currently in use at the
manufacturing plant.
Many options for use in planning are included. These
options use player responses to provide both immediate and
long-range projections for production and sales. As an exam-
ple, Figure 2 shows a screen from the Production Probe.
Given a set of beginning production values, this option calcu-
lates the quarter's output and the effect on it of decisions to
hire or fire workers and pay overtime.
Production Probe
Beginning materials: 688
Maximum production = 968
Beginning workers employed: 188
28' leave, so 98 are effective
Beginning productive machinery: 58
"Production? 638.42 Ending materials = 148.69
Hire/fire: 58
•/. Overtime: 18
Production = 731 .55 :
Ending materia Is
Figure 1.
Figure 2.
When planning is complete, the player enters 12 deci-
sions to complete the next quarter. Corplan then quickly
calculates and displays summarized results of these deci-
sions for the player's approval, as shown in Figure 3. Then the
status of the corporation is updated and itemized in a series of
accounts and an income statement, a closing balance sheet
(Figure 4, for example), and reports of ending values for
the quarter.
THE CORPLAN CORPORATION
At the beginning of play, the player or team has just taken
over a corporation that makes and sells "Widgets." The firm
has one 10,000 square-foot plant, 50 productive machines
with 15 machines on order, 600 units of raw material, 100
workers, 50 salespeople, and $1 000 worth of advertising. An
opening balance sheet shows the firm's assets and liabilities,
and the resulting value of shareholders' equity.
In Corplan, as in the real business world, profit is the
objective. The management must plan wisely to make the
enterprise profitable— for its stockholders and for its own
solvency. Therefore, most Corplan managers start out to
maximize profit within the 1 2-quarter time limit. But this long-
TRS-80 Microcomputer News, November 1983
range objective will give way to survival planning if bad
decisions weaken the corporation. Success depends on a
thorough understanding of the Corplan model and good
planning rather than good luck.
Figure 3.
Running a Corplan corporation requires quarterly deci-
sions in four areas of corporate management: production,
marketing, investments, and finance.
Figure 4.
PRODUCTION AND SALES
Each quarter, the corporation must supply Widgets for its
consumers according to the management's production plan
and Corplan's production constraints. Sufficient raw materi-
als must be purchased to meet the next quarter's target
output without wastage of excess inventory. Workers must be
hired to replace those lost to turnover and to increase the
productivity of the work force; however, new employees are
only half as effective as trained employees. A percentage of
the basic workers' payroll can be paid as overtime to in-
crease productivity without hiring additional workers.
The corporation must create demand for its output in a
market that can be partially controlled through pricing and
advertising. For example, Figure 5 shows a screen from the
Demand Tabulation option in the CORAID program. This
long-range planning feature calculates and displays the level
of demand resulting from a proposed range of advertising
and price combinations. Supply and demand should be
matched as closely as possible to avoid either shrinkage of
finished goods inventory or cancellation of unfulfilled orders.
Even so, a surplus could result from not having an adequate
force of effective salespeople to deliver on the demand
created.
I 388 480 588 688 788 988 ':
""I 1847 1191 1328 1461 1589 1712 1832 1<
694 835 978 1899 1224 1344 1461 1574
93 729 859 984 1185 1222 1335 1445
-.93 623 749 878 986 1899 1289 1316
392 518 638 755 868 977 1883 1187
291 412 528 648 749 855 958 1858.1
'"" 386 417 525 638 732 ;832 929 1
■ H
SwrJ
98 288 387 411 512 618 786 I
8 94 197 296 393 488 588 I
8 8 86 181 274 365 455 '
ramps
" fi
Figure 5.
Two more constraints can affect both production and
sales. Crowding too many resources into the available plant
space causes an increase in employee turnover, decreasing
the quarter's anticipated output and deliveries. Insufficient
funding causes a cutback in the firm's expenditures for new
employees and raw materials, decreasing the quarter's antic-
ipated output and deliveries and limiting the next quarter's
production target.
INVESTMENTS AND FINANCE
Acquiring more plant space and new machines, two of
Corplan's three investment decisions, require careful sched-
uling and budgeting. A new plant won't become operational
until the third quarter after it is ordered; at that time it must be
paid for in full. Machines, on the other hand, must be paid for
when purchased, even though there is a one-quarter delay
between purchase and receipt. The new machines are put on
order, and then only a few of these ordered machines are
received. In the meantime, productive machines continue to
deteriorate at a rate of 10% each quarter. When planning for
expenditures, surplus funds can be invested in securities. A
securities investment will yield additional income for the cor-
poration, and securities can be sold whenever cash
is needed.
Investments and operational expenses must be carefully
budgeted. Funds can be raised by issuing bonds and addi-
tional stock shares, or through an emergency bank loan if
necessary. Cash can be spent to repay long-term loans and
buy back issued stock shares. And, sometime in the simula-
tion, dividends must be paid to the stockholders. The quar-
terly stock price is generated by a formula simulating the real
market, based on past and expected profits and dividends,
value of assets, and a "good will" valuation of orders and
management.
TRS-80 Microcomputer News, November 1983
MANAGEMENT DECISIONS
Based on the corporation's current condition, its overall
business plan, and the Corplan parameters and factors, the
following 1 2 decisions must be planned and implemented for
each quarter:
1 . Purchase additional machinery
2. Order a new plant
3. Buy or sell securities
4. Pay a dividend to the stockholders
5. Issue or retire bonds
6. Issue or buy back stock shares
7. Hire or fire workers
8. Pay overtime to workers
9. Purchase additional raw materials
10. Hire or fire salespeople
1 1 . Increase advertising
12. Set the price for Widgets
After the first six of these 12 decisions are entered, the
program calculates the firm's financial status to check for
bankruptcy. First the committed expenditures for the quarter
are subtracted from the current cash sources— cash at the
bank and accounts receivable— to yield the amount of cash
free to spend. Then the total cost of the spending decisions is
subtracted from the sum of the funds raised and cash free to
spend. The corporation passes the bankruptcy test if it still
has cash remaining. Even if it is operating at a deficit at this
point, a bank loan is drawn upon to keep the firm afloat and
allow completion of the quarter.
Bankruptcy is the worst thing that can happen in
Corplan. If the operating deficit after the^first six decisions
can't be covered by the maximum bank loan for the quarter,
the simulation stops, and the deficit is explained. In Corplan,
however, there is no need to jump out the window if the
business fails. New funding can be attempted for the quarter,
or, if the corporation is too far gone, the simulation starts again
from Quarter 0. Novice players are even allowed to go back
to an earlier quarter and replay it to avoid bankruptcy.
CORPLAN MODIFICATION
To make Corplan even more dynamic, the model for the
simulation can be altered. A hidden menu (Figure 6) allows
m$
1 - Staff and Production Parameters
2 Sales Parameters
3 Financial Parameters
.4 Resource Factors
5 Financial Factors
6 Opening Balance Sheet
7 Beginning Values
8 Reset Parameters and Factors
'9 Reset Opening Balance Sheet and Valu
IB Permit Replay
11 Return to CORAID Menu
Enter Selection: ,.
change of the values assigned to two kinds of Corplan vari-
ables: (1) the parameters and quarterly factors affecting all
corporations, and (2) the balance sheet and opening values
affecting only new corporations.
Instructors can design a particular business environ-
ment or business condition for a demonstration or for class-
room use. After introducing and playing Corplan in its original
form, they can alter the simulation's parameters and starting
values before using it for student evaluation. They can even
make modifications before the students reload Corplan to
continue their simulations. For example, the instructor could
raise or lower the parameters for taxes and interest rates, or
remove the students' ability to replay previous quarters. Ad-
vanced users can answer their own "what if" questions by
applying their Corplan strategy under different conditions for
production, sales, and finance.
Such modifications aren't irreversible. Corplan's vari-
ables can be altered at any time, or easily reset to the original
values. Then new students can follow the manual's demon-
stration of a sample quarter and the explanations of Corplan
using the original values for the model.
PROVEN EDUCATIONAL VALUE
Corplan has a successful history of use in universities
and businesses in England. The model was developed in an
academic environment by Martin Mitchell and Patrick Shack-
leton and directed at management students and business
executives in training courses. During the 70s it was used
extensively by players at terminals connected to mainframe
computers.
Mitchell and Shackleton adapted Corplan to the TRS-80
Model I in 1 978 for their firm, Understanding Ltd. Freed from
the restrictions of the mainframe computer, Corplan's use
spread rapidly. Microcomputer versions of Corplan have
been adopted for classes in economics, finance, and busi-
ness management, and for the management training pro-
grams of several British corporations. In fact, teams from
schools and businesses compete in frequent Corplan com-
petitions sponsored by colleges and institutions.
Radio Shack's version has been carefully revised so that
the Corplan model represents the operation of an American
corporation. Differences in the two countries' practices of
taxation and depreciation, for example, have been elimina-
ted, and American business terminology and monetary units
are used throughout.
The Corplan package includes the programs
CORGAME and CORAID, a user's manual that demonstrates
a sample quarter and explains the model's calculations and
situations, and planning forms that can be copied for use by
each player or team of players. Corplan (Cat. No. 26-261 9) is
available for $49.95 from your local Radio Shack Computer
Center, store or dealer (prices may vary at individual stores or
dealers).
Make a sound business decision and invest in Corplan,
whether you're preparing for the business world or sharpen-
ing your planning skills. J5
Figure 6.
TRS-80 Microcomputer News, November 1983
Computer Customer Service
System Integration
If you were forced to enter all your computer data twice
over, it would represent an unwanted investment in machine
time, operator time, and therefore money. If you find that part
of your normal daily data operation involves typing the same
piece of data in two or more places, then you have perceived
the need for System Integration.
System integration can be summarized as the act of
combining a set of processes or procedures which result in
the entry of data which can be used by subsequent pro-
cesses. Subsequent processes can capture the data already
entered, avoiding duplication of data-entry.
For example, many of the Radio Shack packages are
designed to run as stand-alone programs, or run interac-
tively. The 26-46xx and 26-62xx series of COBOL based
Accounting packages for Models II/1 2/1 6 interface with each
other in certain places by sharing data-files. Scripsit and
Profile interact (in the merge process), by virtue of the fact that
Profile can write a special data-file which Scripsit can read.
However, the Accounting packages are not designed to inter-
face with either Scripsit or Profile. But can they be integrated
into one system? The answer is "Probably yes."
For the purposes of this article, we will look upon the
question of system integration as a sport. We will discuss the
COBOL/SCRIPSIT/Profile game later, but we first need to
establish two sets of rules. The first set we will call the ground
rules— there are four of them and strictly speaking they are
questions rather than rules. The second set we will call the
game rules— there are seven of them. After establishing the
rules, we will look at a game-plan!
THE GROUND RULES
What OUTPUT is needed?
What INPUT is needed?
What SYSTEM is to be used?
What PROCESSES will turn our input into desired
output?
The four considerations above form the basis of our
ground rules. The four questions will need to be kept in mind,
even in our discussion of the more complex system integra-
tion questions which will be our seven-point game rules.
THE GAME RULES
The game, as played here, has seven major categories
of rules. Obviously, in other system-integration leagues, they
categorize a little differently to suit their local requirements. If
you don't like these rules, then adapt them to suit your needs,
or join another league.
1) Seek Direction.
A preliminary investigation should be held to define the
nature of the problem, clarify the aim of the exercise, gener-
ate an approach to the solution, and make some kind of
determination of the feasibility of the approach.
2) Prepare Study.
A fact finding mission should be set up to examine the
present system and investigate the constraints involved. Con-
straints will be real or perceived and will be organizational,
financial, technical, or operational in nature. As more facts
are gathered, more constraints should become apparent,
including those problems which will be created (or become
more critical) as a result of any possible solution:
3) Analyze Findings.
Sort out the facts, get answers to the unknowns, estimate
the imponderables. Check the feasibility again, in the light of
the sorted facts.
4) Formulate Ideas.
Examine all possible solutions; hold a "brainstorming"
session. Look closely at the tools and resources available
now (or that are likely to be available) and examine their
effectiveness in all of the possible solutions.
5) Finalize Ideas.
Consideration of all formulated ideas should be under-
taken on a cost justification basis. Look at the "one off" costs
of implementation, the running costs, the defined advantages
of each, (savings in time, money, productivity, etc), and the
possible "spin off" effects (future benefit).
6) Formulate Solution.
Formulating the solution is just like choosing your "start-
ing line-up," picking over the ideas until your preferred solu-
tion becomes a system outline. This is also the point to find out
whether you are meeting the system constraints as previ-
ously defined. If so then the decision is made. (If not then go
back one or more steps).
7) Verify Solution.
Find out whether the solution as defined solves the prob-
lems as defined and fulfills the aims of the exercise. Are the
resources deemed to be needed, actually tested under the
circumstances of your use, or do you need a "practice
game" to be certain. This will also be a cross-check on the
availability of any tool or resource not currently in your pos-
session. If the solution is not the only one under active consid-
eration at this moment, then your task is made all the more
difficult. It is probably better to go back one or more steps and
arrive back here with only one solution to be verified at a time.
THE GAME PLAN
So, having all the rules in place, we only need to plan the
game. To do this, consider the following as checks or stages
in the planning and implementation process of our integrated
system.
Is the data-entry procedure in place?
Is the programming (if any) currently underway?
Are file conversion or transfer procedures prepared?
Are all other hardware, software, and organizational as-
pects covered?
Is the implementation timing secure?
TRS-80 Microcomputer News, November 1983
Is the testing complete?
Is the operation manual completed?
Are the operators trained?
If we're ready to go, then we'll play the game now!
Review the scoreboard— how did we do?
Of course being so well prepared, we won the game, but
we have a whole season in front of us; what lessons have we
learned for the future?
A WORKED EXAMPLE
Don't forget the four ground rules; they are implicit
throughout this brief example. Don't confuse "preference"
with "need" when you work your own system integration
question through the "rule-book" either.
We will put our COBOL/SCRIPSIT/Profile through the
seven point rule-book.
1) Seek Direction. The problem is that, our six or seven
salesmen seem to be good at getting their foot in the door, so
to speak, and they are very good with the big customers and
problem accounts and so on, but we seem to be missing the
undoubted opportunities we should have, in getting our mid-
dle of the road customer up to be a big customer or prevent-
ing them from becoming problem customers. We ought to be
able to provide our salesmen with the right type of informa-
tion, soon enough, and conveniently enough, to increase our
sales substantially.
2) Prepare Study. Our salesmen are spread over two or
three states, and they do some fine work with Mod II Profile to
help them keep track of qualifying prospects. They seem not
to have the time to update Profile from the Accounts Receiv-
able (Mod II + HD) reports that we give them every so often
at the sales meetings here at Head Office. It's a miracle if they
track any more than their ten best and ten worst accounts.
Their secretaries in the local offices do a good job with
SCRIPSIT/Profile merge for these cases, and for prospective
customers, but they are so busy on the telephone that they
don't have time to type in the sales details for a good 90% of
their customers. Not until we get our sales up substantially
can we afford much in the way of more staff, but a few
thousand dollars isn't going to hurt us, if we can see it'll get us
somewhere. See the problem? Nobody has the time to get
the information to the place where it will be of most use,
because, as we're set up, nobody has the time to type all that
stuff in again.
3) Analyze Findings. The fact is that we have a Head
Office Order Entry/Accounts Receivable database, and it has
no pre-defined means of interfacing with the sales offices
Profile databases. In any case, they are at different locations.
We check a few more facts here and there, and yes, it should
be feasible to get the relevant data from here to there without
adding any more data entry clerks. Watch out for one thing
though. As we grow, we may need to get a little more orga-
nized here at Head Office, which is the only place we do the
telephone Order Entry and Accounts Receivable. It should
be OK if we watch it carefully.
4) Formulate Ideas. At various meetings, with various
people, the following ideas are thrown into the arena:
Get the local offices a Telephone link to hook into Head
Office's database.
Get the Sales Analysis program.
Get AR/OE source code and write (or have written) some
custom programs.
Upgrade to TRS-Xenix multi-user operating system.
Get each office to run its own AR, etc.
Get a mini-computer that will allow on line use of ten or so
terminals.
Modify the sales bonus scheme.
Hold regular sales meetings.
Get the Profile Plus program— more features.
Get the needed information to the salesmen on disk and look
at ways to dump that data to the salesmen's databases.
No violent objections to this last suggestion, even from
our Accountant.
5) Finalize Ideas. The telephone link, the mini computer,
and everyone on Xenix are presently discarded as options
because of the cost/benefit ratio, and some of the other
options get dropped for other reasons, such as "throwing
away the baby with the bath water," or we will lose a great
deal of our present efficiency in the process of change.
6) Formulate Solution. The system outline we end up
with?
With the help of the AR source code and the COBOL com-
piler, a custom program will go into AR's files, select the
information required, and spin it off to disk files (say one for
each salesman).
FCOPY from HD to one floppy for each salesman.
Hand out the floppies at sales meetings each 1st and 3rd
Friday of the month.
Write a BASIC program to be run by each salesman on his
own machine.
Get hard copy with "warning flags" and dump data into
Profile at the same time.
Profile can search for flags and spin off data for SCRIPSIT/
Profile merge.
Personalized letters get written to the appropriate customers,
and a pretty well up to date database is available for
everyone.
It all looks good! We seem to have a solution which meets
the constraints.
7) Verification. We believe we have solved the problem,
and fulfilled the aims of the exercise. Is it the only solution to
the problem? Not quite. The Xenix alternate is very attractive
still, so we decide to go that way when we have the secure
customer base and increased sales that we want, making as
certain as we can that everything we do now will be possible
under Xenix. A two stage implementation plan in other words.
Resources? The Software is now on order and having
delegated some of my responsibilities, I have the time (and
fortunately the expertise) to get the programming done. Our
machine at the head office is not very often used before 1 1 :00
in the morning anyway; disk space is there, so we are away!
CONCLUSIONS
If an amateur sport is worth planning for, then for certain,
your system integration needs are worth planning too. But
neither confuse needs with preferences nor forget to include
intangibles into the cost/benefit calculations if you can. Your
present system may not have any duplication of data-entry,
but some desired enhancement to your system may have
been discarded from your consideration unwittingly because
of a (quite natural) fear that you might have to type in all that
data twice.
If it needs to be done, it can be done. It is only a matter of
deciding by what means and at what price.
10
TRS-80 Microcomputer News, November 1983
THE SYSTEM INTEGRATION CATALOG
There are sports equipment catalogs, and the conclud-
ing paragraph here is a small and incomplete catalog of ideas
for you to pursue. It is without prices and catalog numbers,
and without sufficient examples, and only intended to give
you a sense of the great number and variety of tools and
resources available.
Computer to Computer communications— hard wired,
telephone modems, async, bisync, diskette files, tape files,
communication packages.
Terminal to Computer communications— hardware
terminals, terminal utilities, terminal emulator packages,
modems.
Inter-Program communication— interactive packages,
custom software, in-house programming, contract program-
ming, source codes, file/data transfer utilities.
Peripheral communications— Card Readers, Bar Code
Readers, plotters, multiplexers, "black box" emulators.
Inter-Language communications— machine language,
file compatibility, pure ASCII data files, language packages,
JCL & TRS-Xenix shell, DO files.
Hard-Copy communication— multi-part paper/forms,
multi copy programs, spooling to disk files, merge letters.
And of course, temporary (to become permanent?) data-
entry clerks, to duplicate, or triplicate, all that data. J3
Computer Customer Service
Address and Phone Numbers
8AM to 5PM Central Time
Computer Customer Services
400 Atrium, One Tandy Center
Fort Worth, Texas 76102
Model I/III/4 Business Group (817) 390-3939
Model 11/12/16 Business Group (817) 390-3935
Languages and Compilers (817) 390-3946
Color/Model 100/Pocket Computer Group (817) 390-3944
Hardware and Communications Group . . . (817) 390-2140
Educational Software (817) 390-3302
Games, Books, and New' Products (817) 390-2133
Newsletter Subscription Problems (817) 870-0407
**-* — ■— - -m
Yorrick's Escape
Brian Mullen, Ph.D.
Department of Psychology
Murray State University
Murray, KY 42071
You awaken in the dreaded Dungeons of Amleth.
Nearby, a disembodied skull begins chattering at you, offer-
ing to help you escape. You pick up Yorrick and set off
through the catacombs, in search of a means of escape . . .
Yorrick's Escape is a BASIC language adventure-type
computer game which takes up 170 lines and requires ap-
proximately 1 3,000 bytes of random access memory. Yorrick
was developed out of the author's frustration with the rapid
habituation to which many superficially complex adventure
games are susceptible. For example, many adventure
games will take place in a complicated dungeon, ship, man-
sion, etc. However, once you have worked your way through
the game's domain, you quickly develop a map and deter-
mine how to locate and use the object(s) required to escape.
Soon after the problem-solving challenge of the adventure
has dissipated, the adventure degenerates into an exercise in
typing speed.
Yorrick provides an interesting alternative. The scenario
is initially similar to the typical adventure game. Yorrick de-
scribes objects that he sees, your current location, possible
exits, etc. The player moves about by entering compass
directions (N, S, E, W) and uses one- or two-word commands
to acquire objects or to interact with the environment. Five
levels of difficulty provide varying levels of challenge. The
dungeon seems to be relatively simple the first time you play
the game; there are nine interconnecting chambers, with
various dungeon-sounding descriptions (e.g., "dark, damp
passageway"). And, of course, the chattering skull in the
upper right corner of the screen is Yorrick.
However, suppose you trip and fall into a pit of suck-
erworms (an unfortunate possibility); or, suppose you are
killed in a battle with a blood-thirsty snotgurgle. If you dust
yourself off and begin the game again, you will find that the
descriptions of the chambers have changed, the arrange-
ment of the chambers has altered, different objects are
present, new monsters confront you. All of these attributes
are randomly determined with each start of the game. There
are sixteen different chamber configurations, 100 different
room descriptions, and nine different rooms in which you
might first awaken. The monsters which lurk in the various
chambers, the objects which you might pick up, and the
attributes of some of those objects are all different with each
play of Yorrick.
TRS-80 Microcomputer News, November 1983
11
A further twist built into Yorrick is that there is more than
one end-game scenario. Each end-game scenario lets you
escape the dungeon proper, only to thwart you with a prob-
lem which requires creative and analytic consideration. Only
by solving this problem with the resources you have at hand,
can you attain the safety of the Forest. One of the end-game
scenarios will occur with considerable regularity; another will
occur only rarely All of these scenarios will demand the
utmost of you and Yorrick. Being able to clobber the manda-
tory swarthy dwarf is necessary, but not sufficient, to escape
from the Dungeons of Amleth.
10 CLEAR 1000
: DIMI$(20), A$(9), B$(9), C$(9), D$(9), PL(9),
AR$(9), AM $(10), F$(9), AN$(9), N$(10), MD$(9),
M$(9), 0D$(9), 0$(9), IN$(200), S$(10), R$(10),
MS(9), W$(9), WA$(9), MC$(7), MV$(6)
20 CLS
: PRINT " YORRICK' S ESCAPE
BRIAN MULLEN"
: FOR U=l TO 250
: NEXT U
30 PRINT
: PRINT
: INPUT "ENTER LEVEL OF DIFFICULTY (1=EASY
5=DIFFICULD"; DF
40 PRINT
: INPUT "DO YOU WANT INSTRUCTIONS (Y/N)" ; 1$
50 IF I$="Y" THEN GOTO 60
: ELSE GOTO 140
60 CLS
: PRINT "WELCOME TO THE DREADED DUNGEONS OF
AMLETH. YOU MUST HAVE
DONE SOMETHING TERRIBLE TO HAVE BEEN
SENT HERE!":
70 PRINT ""
80 PRINT "HELLO. MY NAME IS YORRICK. I WAS BANISHED
TO THESE DUNGEONS
AGES AGO BY THE BALEFUL WITCH THELMA.
I LONG TO BE FREE, TO REST IN
PEACE ... AS YOU CAN SEE, I DID NOT
SURVIVE LONG"
90 PRINT "ENOUGH TO ESCAPE FROM THIS HELL-HOLE. BUT
I DID LEARN MUCH
ABOUT THE DANGERS (AND THE TREASURES)
HIDDEN IN THE CATACOMBS. IF YOU CARRY
ME WITH YOU, I MAY BE ABLE TO HELP."
: J=25
: GOSUB 1590
100 PRINT
: INPUT "(ENTER TO CONTINUE)"; E$
: IF E$="" GOTO 110
110 CLS
:" PRINT "I CAN GIVE YOU STATUS REPORTS,, TELL YOU
WHAT YOU'RE
CARRYING, WARN YOU OF DANGERS,
IDENTIFY VALUABLE OBJECTS, AND SO ON."
120 PRINT "ARE YOU READY?"
J=5
GOSUB 1590
PRINT
PRINT "(ENTER TO CONTINUE)"
J=l
GOSUB 1590
INPUT E$
IF E$="" GOTO 130
130 PRINT "ALRIGHT. JUST BE CAREFUL . . .
... AND WATCH OUT
FOR THE SUCKER WORMS ! ! "
: J=8
: GOSUB 1590
140 MC$(1)="R"
: MC$(2)="S"
MC$(3)="K"
MC$(4)="H"
MC$(5)="T"
MC$(6)="X"
MC$(7)="Z"
150 MV$(1)="A"
MV$(2)="E"
MV$(3)="I"
MV$(4)="0"
MV$(5)="U"
MV$(6)="Y"
160 PW$=MC$(RND(7))+ MV$(RND(6))+ MC$(RND(5))+
MC$(RND(5))+ MV$(RND (6))+ MC$(RND(7))
170 W$(l)=" FLAMING SWORD"
W$(2)="MAGIC LANCE"
W$(3)="BROADSWORD"
W$(4)="MACE"
W$(5)="BATTLEAXE"
W$(6)="CUDGEL"
W$(7)="CLUB"
W$(8)="BATTLEAXE"
W$(9)="MAGIC WAND"
OD$(l)="GOLD COINS"
OD$(2)="DIAMONDS"
OD$(3)="A GOLD RING"
OD$(4)="RUBIES"
OD$(5)="FOOD"
OD$(6)="FOOD"
OD$(7)="EMERALDS"
OD$(8)="SILVER COINS"
OD$(9)="A BAG OF PEARLS"
IN$=""
190 MD$(1)=" SWARTHY DWARF"
MD$(2)="GOBLIN"
MD$(3)="HID£OUS GHOUL"
MD$(4)="EVIL TROLL"
MD$(5)="BLOOD-THIRSTY SNOTGURGLE"
MD$(6)="MIGHTY MADNESS"
MD$(7)="HELL-HAG"
MD$(8)="GHASTLY TROLL"
MD$(9)="DWARF"
200 S$(1)="HALLWAY"
S$(2)="ROOM"
S$(3)="PASSAGEWAY"
S$(4)="CHAMBER"
S$(5)="CRYPT"
S$(6)="ROOM"
S$(7)="GALLERY"
S$(8)="VAULT"
S$(9)="TOMB"
S$(10)="PIT"
210 R$(1)="A LONG, COLD"
R$(2)="A DARK, DAMP"
R$(3)="A MUSTY"
R$(4)="AN ERIE, GREEN"
R$(5)="AN OPPRESSIVE"
R$(6)="A LARGE"
R$(7)="A SMALL"
R$(8)="A FOUL-SMELLING"
R$(9)="A NARROW, BLACK"
R$(10)="A SLANTED"
220 SS=10
: FS=10
: SC=SC+FS+SS
: WL$=""
: C=0
230 A$(4)="N"
A$(6)="N"
A$(7)="N"
A$(8)="N"
Q=RND(2)
IF Q=l THEN A $(1)="N" ELSE A$(2)="N"
Q=RND(2)
IF Q=l THEN A$(5)="N"
240 B$(3)="S"
: B$(7)="S"
12
TRS-80 Microcomputer News, November 1983
B$(8)="S"
B$(9)="S"
IF A$(5)="N" TriEN B$(6)="S"
Q=RND(2)
IF Q=l THEN B$(1)="S" ELSE B$(2)="S"
250 C$(2)="E M
C$(5)="E"
IF A$(5)="N" THEN Q=RND(2)
IF Q=l THEN C$(l)= "E"
260 IF A$(5X>"N" THEN C$(1)="E"
270 D$(3)="W"
: D$(4)="W"
: IF C$(1)="E" THEN D$(2)="W"
280 FOR PL=1 TO 9
: AR$(PL)=R$(RND(10))
: NEXT PL
290 FOR PL=1 TO 9
: AN$(PL)=SS(RND(10))
: NEXT PL
300 Y=RND(3)
FOR X=l TO 3
IF X=Y THEN M$(X)=MD$(Y) ELSE M$(X)=" M
NEXT X
310 Y=RND(6)
: IF Y<4 THEN GOTO 310
320 FOR X=4 TO 6
: IF X=Y THEN M$(X)=MD$(Y) ELSE M$(X)=""
: NEXT X
330 Y=RND(9)
: IF Y<7 THEN GOTO 330
340 FOR X=7 TO 9
: IF X=Y THEN M$(X)=MD$(Y) ELSE M$(X)= ,m
: NEXT X
350 X=RND(9)
: LS$(X)="MAGIC SCROLL"
360 Y=RND(5)
FOR X=l TO 5
IF X=Y THEN 0$(X)=OD$(Y) ELSE 0$(X)=""
NEXT X
370 Y=RND(9)
: IF Y<6 THEN GOTO 370
380 FOR X=6 TO 9
: IF X=Y THEN 0$(X)=OD$(Y) ELSE 0$(X)=""
: NEXT X
390 Y=RND(8)
FOR X=l TO 8
IF X=Y THEN WA$(X)=W$(Y) ELSE WA$(X)=""
NEXT X
400 Y=RND(9)
: WA$(Y)=W$(9)
410 PL=RND(9)
: DL=RND(9)
420 FS=FS+.6311
: SS=SS-(DF/7.5)
430 CLS
: PRINT "PRESENT LOCATION : "; AR$(PL); " ";
AN$(PL)
440 PRINT "POSSIBLE EXITS : "; A$(PL); " " ; B$(PL); "
"; C$(PL); " "D$(PL)
450 PRINT "OBJECTS I CAN SEE : " ; WA$(PL); " ";
0$(PL); " "; LS$(PL)
: IF WA$(PL)="" AND 0$(PL)="" AND LS$(PL)=""
THEN PRINT @148, "NOTHING"
: J=4
: GOSUB 1590
460 J=4
: GOSUB 1590
470 IF PL=DL THEN PRINT "THERE IS A MASSIVE DOOR ON
THIS WALL"
: J=7
: GOSUB 1590
480 IF SS<=3 THEN PRINT "YOU'RE GETTING WEAK! YOU
NEED SOME FOOD OR SOME REST!"
490 IF SS<1 GOTO 870
500 IF M$(PL)="" THEN GOTO 510 ELSE PRINT "THERE IS A
"; M$(PL); " GLARING AT YOU!"
: GOTO 980
510 PRINT
: INPUT "COMMAND"; 1$
520 IF LEFT$(I$, 3)="GET" OR LEFT$(I$, 3)="TAK" PRINT
"OK"
J=3
GOSUB 1590
GOTO 880
530 IF LEFT$(I$, 3)="ATT" OR LEFT$(I$, 3)="KIL" OR
LEFT$(I$, 3)="HIT" OR LEFT$(I$, 3)="FIG" PRINT
"OK"
: J=3
: GOSUB 1590
540 IF M$(PL)<>"" AND I$="TALK" OR M$(PL)<>"" AND
I$="ASK" OR M$(PL)<>"" AND I$="SPEAK" OR
M$(PL)<>"" AND I$="SAY" THEN PRINT "THE ";
M$(PL); " GRUMBLES AT YOU."
PRINT "I DON'T THINK HE LIKES YOU!"
J=10
GOSUB 1590
GOTO 420
550 IF I$="TALK" OR I$="SPEAK" OR I$="SAY" OR
I$="ASK" THEN PRINT "THERE IS NO ONE HERE EXCEPT
YOU AND I."
J=10
GOSUB 1590
GOTO 420
560 IF I$="READ" AND ST=1 THEN PRINT "ON THE MAGIC
SCROLL IS WRITTEN THE WORD "'; PW$; '"."
J=ll
GOSUB 1590
GOTO 420
570 IF I$=PW$ OR RIGHT$(I$, 6)=PW$ THEN PRINT
"NOTHING HAPPENS."
J=5
GOSUB 1590
GOTO 420
580 IF (I$="WAVE" OR I$="WAVE WAND") AND PL=DL AND
WT=1 THEN PRINT "THE MASSIVE DOOR SLOWLY SWINGS
OPEN ! "
J=10
GOSUB 1590
GOTO 1160
590 IF (I$="WAVE" OR I$="WAVE WAND") THEN PRINT
"NOTHING HAPPENS."
J=3
GOSUB 1590
GOTO 420
IF LEFT$(I$, 3)="LOO" PRINT "OK"
J=3
GOSUB 1590
GOTO 420
610 IF LEFT$(I$, 3)="STA" PRINT "OK"
J=3
GOSUB 1590
GOTO 1140
620 IF LEFT$(I$, 3)="INV" PRINT "OK"
J=3
GOSUB 1590
GOTO 1120
630 IF I$="N" AND PL=1 AND A$(1)="N" THEN PL=7
: GOTO 420
640 IF I$="N" AND PL=2 AND A$(2)="N" THEN PL=7
: GOTO 420
650 IF I$="N" AND PL=4 THEN PL=3
: GOTO 420
660 IF I$="N" AND PL=6 AND B$(1)="S" THEN PL=1
: GOTO 420
670 IF I$="N" AND PL=7 THEN PL=8
: GOTO 420
680 IF I$="N" AND PL=8 THEN PL=9
: GOTO 420
690 IF I$="S" AND PL=1 AND B$(1)="S" THEN PL=6
: GOTO 420
TRS-80 Microcomputer News, November 1983
13
700
710
720
730
740
750
760
770
780
790
800
810
820
830
840
850
870
910
920
930
940
950
960
970
990
10H
IF I$="S" AND PL=2 AND B$(2) = "S" THEN PL=6
: GOTO 420
IF I$="S" AND PL=3 THEN PL=4
: GOTO 420
IF I$="S" AND PL=6 AND A$(5)="N" THEN PL=5
: GOTO 420
IF I$="S" AND PL=9 THEN PL=8
: GOTO 420
IF I$="S" AND PL=8 THEN PL=7
: GOTO 420
IF I$="S" AND PL=7 AND A$(1)="N" THEN PL=1
: GOTO 420
IF I$="S" AND PL=7 AND A$(2)="N" THEN PL=2
: GOTO 420
IF I$="E" AND PL=1 AND C$(1)="E" THEN PL=2
: GOTO 420
IF I$="E" AND PL=2 THEN PL=3
: GOTO 420
IF I$="E" AND PL=5 THEN PL=4
: GOTO 420
IF I$="W" AND PL=2 AND D$(2)="W" THEN PL=1
: GOTO 420
IF I$="W" AND PL=3 THEN PL=2
: GOTO 420
IF I$="W" AND PL=4 THEN PL=5
: GOTO 420
IF I$="N" AND PL=6 AND B$(2)="S" THEN PL=2
: GOTO 420
IF I$="N" AND PL=5 AND A$(5)="N" THEN PL=6
: GOTO 420
IF I$="N" OR I$="S" OR I$="E" OR I$="W" THEN
PRINT "THERE IS NO EXIT IN THAT DIRECTION!"
J=10
SS=SS-.5
GOSUB 1590
PRINT "DON'T BE RIDICULOUS!"
: J=5
: GOSUB 1590
IF RNDQ0X8 THEN PRINT "YOU FOOL!"
: PRINT "YOU HAVE JUST STUMBLED INTO A PIT OF
SUCKER WORMS!"
PRINT "ARRRRGGHHHHH! ! ! "
J=ll
GOSUB 1590
GOTO 1670
ELSE GOTO 420
IF 0$(PL)="" AND WA$(PL)="" AND LS$(PL)="" THEN
PRINT "THERE IS NOTHING HERE TO GET!"
: J=8
: GOSUB 1590 ELSE PRINT "YOU NOW HAVE THE ";
0$(PL); " "; WA$(PL); " "; LS$(PL)
J=7
GOSUB 1590
IN$=IN$+" "+0$(PL)+" "+WA$(PL)+" "+LS$(PL)
IF WA$(PL)<>"" THEN GOSUB 1150
IF WA$(PL)=W$(9) THEN WT=1
IF 0$(PL)=OD$(5) OR 0$(PL)=OD$(6) THEN SS=SS+3
IF 0$(PL)<>"" THEN SC=SC+5
IF LS$(PL)<>"" THEN ST=1
0$(PL)=""
: LS$(PL)=""
IF WA$(PL)=W$(1) OR WA$(PL)=W$(2) OR
WA$(PL)=W$(3) OR WA$(PL)=W$(4 ) THEN FS=FS+3
FS=FS+1
WA$(PL)=""
: GOTO 420
IF RND(5)<3 THEN PRINT "HE LOOKS ANGRY!"
: J=6
: GOSUB 1590
IF RND(5)=1 THEN PRINT
PRINT "THE "; M$(PL); " THROWS A ROCK AT YOU!'
J=10
GOSUB 1590
GOTO 510
IF M$(PL)="" THEN PRINT "THERE IS NO ONE HERE
EXCEPT YOU AND I, AND I CAN'T FIGHT
WITH YOU!"
J=28
GOSUB 1590
GOTO 420
1020 FOR X=l TO 6
1030 MS(X)=RND(16)+DF
: IF MS(X)<10 GOTO 1030
1040 NEXT X
1050 IF FS>MS(PL) PRINT "YOU HAVE KILLED THE ";
M$(PL); "!!"
J=10
GOSUB 1590
M$(PL)=""
FS=FS+(1/1 .3*DF)
GOT 0420
1060 IF FS=MS(PL) OR FS>=(MS( PL)-1 ) PRINT "YOU HIT
THE "; M$(PL); "!"
PRINT "BUT HE'S NOT DEAD YET!"
FS=FS+(1/1.3*DF)
J=8
GOSUB 1590
GOTO 420
1070 IF FS<(MS(PL)-1) THEN PRINT "YOU SWING AT THE "
M$(PL); " BUT YOU MISS!"
PRINT "THE"; M$(PL); " SWINGS AT YOU!"
J=8
GOSUB 1590
1080 Y=RND(10)
: IF Y>=5 AND FS<(MS(PL)-1 ) THEN PRINT "AND HE
HITS YOU! !"
J=4
GOSUB 1590
FS=FS-2
1090 IF Y<5 AND FS<(MS(PL)-1 ) THEN PRINT "BUT HE
MISSES!"
: J=4
: GOSUB 1590
1100 IF Y>=8 AND FS<(MS(PL)-1 ) THEN PRINT "YOU ARE
DEAD! ! !"
FS=FS-10
J=4
GOSUB 1590
GOTO 1670
1110 GOTO 420
1120 IF IN$="" THEN PRINT "YOU AREN'T CARRYING
ANYTHING RIGHT NOW."
J=10
GOSUB 1590
GOTO 420
1130 PRINT "YOU ARE CURRENTLY HOLDING "; IN$
J- 10
GOSUB 1590
GOTO 420
1140 CLS
PRINT M * * * CURRENT STATUS * * *"
PRINT "FIGHTING STRENGTH : " ; FS
PRINT "SURVIVAL STRENGTH : " ; SS
J=15
GOSUB 1590
GOTO 420
1150 WL$=WA$(PL)
: RETURN
1160 PRINT "WELL! I THINK WE MADE IT!"
J=5
GOSUB 1590
C=0
1170 CLS
: PRINT "THIS IS THE TUNNEL LEADING OUT OF THE
DUNGEON AND INTO THE FOREST."
: J=10
: GOSUB 1590
1180 CH=RND(10)
: IF CH>3 GOTO 1200
1190 IF CK>1 GOTO 1350 ELSE GOTO 1490
1200 CLS
: PRINT "UH OH! THERE'S A GIANT
14
TRS-80 Microcomputer News, November 1983
1210
1220
1230
1240
1250
1260
1270
1280
1290
1300
1310
1320
1330
'I THINK HE JUST LAUGHED AT
"I TOLD YOU HE IS JUST TOO
SUCKER WORM BLOCKING THE WAY!"
J=8
GOSUB 1590
PRINT
INPUT "COMMAND"; 1$
IF I$="HIT" OR I$="KILL" OR I$="ATTACK" OR
I$="FIGHT" THEN PRINT "YOU SWING AT THE GIANT
SUCKER WORM!"
PRINT "BUT HE'S JUST TOO BIG!"
C=C+1
J=10
GOSUB 1590
IF C<3 GOTO 1200
IF C=3 THEN PRINT
YOU!"
J=9
GOSUB 1590
GOTO 1200
IF C=4 THEN PRINT
BIG!"
: PRINT "THE GIANT SUCKER WORM HAS YOU BY THE
WAIST!"
J=9
GOSUB 1590
GOTO 1670
IF I$="N" OR I$="S" OR I$="W" OR I$="E" THEN
PRINT "THERE IS NO EXIT IN THAT DIRECTION.
BESIDES, THERE'S NO TURNING BACK NOW!"
J=6
GOSUB 1590
GOTO 1200
IF I$="LOOK" GOTO 1200
IF I$="WAVE" OR I$="WAVE WAND" THEN PRINT
"NOTHING HAPPENS"
J=4
GOSUB 1590
GOTO 1200
IF LEFT$(I$, 3)="INV" AND IN$=" " OR LEFT$(I$,
3)="INV" AND IN$=" " OR LEFT$(I$, 3)="INV" AND
IN$=" " OR LEFT$(I$, 3)="INV" AND IN$=" "
THEN PRINT "YOU ARE NOT CARRYING ANYTHING RIGHT
NOW."
J=10
GOSUB 1590
GOTO 1200
IF LEFT$(I$, 3)="INV" THEN PRINT "YOU ARE
CURRENTLY HOLDING "; IN$
J=10
GOSUB 1590
GOTO 1200
IF I $=" STATUS" OR I$="STA" THEN CLS
PRINT "* * * CURRENT STATUS * * *"
PRINT "CURRENT LOCATION : EXIT TUNNEL"
PRINT "FIGHTING STRENGTH : "; FS
PRINT "SURVIVAL STRENGTH : "; SS
J=15
GOSUB 1590
GOTO 1200
IF I$="SAY" OR I$="TALK" OR I$="SP£AK" THEN
PRINT "WHAT CAN YOU SAY TO A 230 FOOT WORM?"
J=10
GOSUB 1590
GOTO 1200
IF I$="READ" AND ST=0 THEN PRINT "THERE IS
NOTHING HERE TO READ"
J=5
GOSUB 1590
GOTO 1200
IF I$="READ" AND ST=1
SCROLL IS PRINTED THE WORD
J=ll
GOSUB 1590
GOTO 1200
IF I$=PW$ OR RIGHT$(I$, 6) PW$ THEN PRINT "THE
SPELL HAS WORKED!"
: PRINT "THE SUCKER WORM HAS VANISHED!!"
1340
13!
1360
1370
1380
1390
1400
1410
THEN PRINT "ON THE MAGIC
PW$; "'."
1420
1430
1440
1450
1460
1470
J=10
GOSUB 1590
GOTO 1660
PRINT "I DON'T UNDERSTAND YOU."
J=9
GOSUB 1590
GOTO 1200
CLS
PRINT "THE PASSAGEWAY HAS BECOME A DEAD-END.
J=5
GOSUB 1590
GOTO 1360
CLS
: PRINT "THE ENTIRE WALL HERE
IS A LARGE MIRROR."
J=10
GOSUB 1590
PRINT
INPUT "COMMAND";
IF I$="WAVE" OR 1$
"NOTHING HAPPENS"
J=3
GOSUB 1590
GOTO 1360
N" OR 1$
1$
="WAVE WAND"
THEN PRINT
IF 1$
PRINT
'S'
*E" OR I$="W" THEN
OR I$=
THERE IS NO TURNING BACK NOW!
GET US OUT OF HERE!"
J=8
GOSUB 1590
GOTO 1360
IF I$="HIT" OR I$="ATTACK" OR I$="TOUCH" OR
I$="OPEN" THEN PRINT "THAT DOESN'T SEEM TO DO
ANY GOOD."
J=5
GOSUB 1590
GOTO 1360
IF LEFT$(I$, 3)="INV" THEN PRINT "YOU ARE
CURRENTLY CARRYING : " ; IN$
J=10
GOSUB 1590
GOTO 1360
IF LEFT$(I$, 3)="STA" THEN CLS
PRINT "* * * CURRENT STATUS * * *"
PRINT "CURRENT LOCATION : EXIT TUNNEL"
PRINT "FIGHTING STRENGTH : "; FS
PRINT "SURVIVAL STRENGTH : "; SS
J=15
GOSUB 1590
GOTO 1360
IF I$="SAY" OR I$="SPEAK" OR I$="TALK" THEN
PRINT "WHAT WOULD YOU LIKE TO SAY?"
: J=6
: GOSUB 1590
: GOTO 1360
IF RIGHT$(I$, 6)=PW$ THEN PRINT "THE MIRROR
SHIMMERS SLIGHTLY ... BUT
NOTHING HAPPENS ..."
J=12
GOSUB 1590
GOTO 1360
IF (I$="READ" OR I$="SCROLL") AND ST=1 THEN
PRINT "ON THE MAGIC SCROLL IS WRITTEN THE WORD
.... pw$ .
J=10
GOSUB 1590
GOTO 1360
PR$=MID$(PW$, 6, 1)+MID$(PW$, 5, 1)+MID$(PW$, 4,
1)+MID$(PW$, 3, 1) +MID$(PW$, 2, 1)+MID$(PW$, 1,
1)
IF I$=PR$ THEN PRINT "THE MIRROR SHIMMERS, THEN
DISAPPEARS! LOOK . . . THERE IS
THE FOREST!"
J=12
GOSUB 1590
GOTO 1660
IF I$="LOOK" THEN PRINT "OK"
TRS-80 Microcomputer News, November 1983
15
J=3
GOSUB 1590
GOTO 1360
1480 PRINT "I DON'T UNDERSTAND YOU."
J=5
GOSUB 1590
GOTO 1360
1490 CLS
: PRINT "UH OH . . . UH OH . . ."
: PRINT "AN ABYSS YAWNS BEFORE US . . . BEFORE
US . . ."
: PRINT "THIS IS THE DREADED CHAMBER
OF ECHOES ... OF ECHOES ..."
J=18
GOSUB 1590
PRINT
INPUT "COMMAND"; 1$
1500 IF I$="N" OR I$="S" OR I$="E" OR I$="W" PRINT
"THERE IS NO WAY TO GO IN THAT DIRECTION . . .
DIRECTION ..."
: PRINT "BESIDES, THERE'S NO TURNING BACK NOW .
. . BACK NOW ..."
: J=16
: GOSUB 1590
: GOTO 1490
1510 IF I$="HIT" OR I$="ATTACK" OR I$="KILL" PRINT
"THERE IS NO ONE HERE BUT ME . . . HERE BUT ME .
II
: PRINT "AND I CAN'T FIGHT WITH YOU . . . FIGHT
WITH YOU"
J=14
GOSUB 1590
GOTO 1490
1520 IF I$="SAY" OR I$="SPEAK" OR I$="TALK" PRINT
"WHAT WOULD YOU LIKE TO SAY . . . LIKE TO SAY .
. ?"
J=10
GOSUB 1590
GOTO 1490
1530 IF I$=PW$ PRINT "THE GROUND BENEATH US RUMBLES .
. . RUMBLES ..."
: PRINT "BUT NOTHING ELSE HAPPENS . . . ELSE
HAPPENS ..."
J=16
GOSUB 1590
GOTO 1490
1540 IF LEFT$(I$, 6)=PW$ AND RIGHT$(I$, 6)=PW$ PRINT
"LOOK!"
: PRINT "THE ABYSS HAS CLOSED ... HAS CLOSED .
ii
: PRINT "AND A DOORWAY OUT OF THE DUNGEON AND
INTO THE FOREST HAS APPEARED . . .
HAS APPEARED ..."
: J=18
: GOSUB 1590
: GOTO 1660
1550 'IF I$="LOOK" OR I$="SEARCH" PRINT "OK"
: J=3
: GOSUB 1590
: GOTO 1490
1560 IF I$="WAVE" PRINT "NOTHING HAPPENS"
J=5
GOSUB 1590
GOTO 1490
1570 IF (LEFT$(I$, 4)="READ" OR I$="SCROLL") AND ST=1
PRINT "THE WORD "* ; PW$; '" IS PRINTED ON THE
SCROLL ... ON THE SCROLL ..."
J=15
GOSUB 1590
GOTO 1490
1580 PRINT "I DON'T UNDERSTAND YOU . . . YOU ..."
J=9
GOSUB 1590
GOTO 1490
1590 POKE 15410, 158
: POKE 15411, 143
POKE 15412
POKE 15413
POKE 15414
POKE 15415
POKE 15416
POKE 15417
1610
1620
1630
1640
1650
1660
POKE 15474 :
POKE 15475 .
POKE 15476 ;
POKE 15477
POKE 15478.
POKE 15479
POKE 15480 :
POKE 15481
POKE 15539, 137
140
140
140
140
129
191
191
191
159
143
148
131
175
191
177
187
191
135
129
I)
176
176
184
129
1670
POKE 15540 :
POKE 15541
POKE 15542 :
POKE 15543 ,
POKE 15544,
FOR A=l TO RND(H
: NEXT A
IF J<=0 THEN RETURN
POKE 15539, 169
POKE 15540, 176
POKE 15541,
POKE 15542,
POKE 15543,
POKE 15544,
FOR A=l TO RND(50)
NEXT A
J=J-1
GOTO 1610
CLS
PRINT "YOU DID IT! !"
PRINT "WE'VE ESCAPED!!"
J=ll
GOSUB 1590
PRINT "YOU TAKE WITH YOU :"
PRINT
PRINT IN$
PRINT "AND ME, OF COURSE!"
PRINT "FINAL SCORE =" ; (SC+FS+SS)*DF
END
CLS
: PRINT "WE'RE DONE FOR!"
: PRINT "NOW WE ARE BOTH DOOMED
TO STAY IN THIS HELL-HOLE FOREVER!"
171
J- 15
: GOSUB 1590
: POKE 15730
158
: POKE 15731
143
: POKE 15732
191
: POKE 15733
191
: POKE 15734
191
: POKE 15735
159
: POKE 15736
143
: POKE 15737
148
POKE 15794, 1
31
: POKE 15795
175
: POKE 15796
191
: POKE 15797
177
: POKE 15798
187
: POKE 15799
191
: POKE 15800
135
: POKE 15801
129
POKE 15859 , 1
37
: POKE 15860
140
: POKE 15861
140
: POKE 15861
140
: POKE 15862
140
: POKE 15863
, 140
: POKE 15864
, 129
: FOR A=l TO
RNDU00)
: NEXT A
: IF A=0 THEI
* END
-D
16
TRS-80 Microcomputer News, November 1983
Illustrated
Program
ine Language
Secondary and college students will be able to learn
fundamentals of machine language programming using
Radio Shack's new Illustrated Computer package for the
TRS-80 32K Color Computer disk system with Disk Extended
Color BASIC.
The computer program illustrates a simplified computer
which students program using a simplified machine lan-
guage. This simplified "Illustrated Computer" has represen-
tations of the major components of a real computer: a
memory, an accumulator, an instruction address register, an
input unit, an output unit, and a control unit. Students give
input to the Illustrated Computer by typing on the Color
Computer keyboard. Output is shown on an illustrated output
unit, displayed on the Color Computer screen. (If you have a
line printer attached to the Color Computer, output can also
be printed. This use of a printer is optional, for teachers who
want their students to hand in program listings, memory
dumps, and program output for grading.)
Seven chapters of tutorial text and exercises in the user's
manual provide all the information needed to program the
Illustrated Computer. Fourteen instructions are available;
these allow students to gain hands-on practice with typical
machine language operations: LOAD and STORE, arithme-
tic, INPUT and OUTPUT, shifting, and branching. An impor-
tant feature of the Illustrated Computer is that it uses a
base-ten (decimal) number system. Students can concen-
trate on programming concepts without having to work with
binary, octal, or hexadecimal number systems.
USING THE PROGRAM
Once you (or a student) has loaded the courseware
program into the Color Computer, a list of options appears on
the screen:
You begin by entering a program (written in the Illus-
trated Computer's machine language) into the Illustrated
Computer's "memory." Option [A] lets you "ENTER
PROGRAM." The program on the screen below-contains a
series of instructions to add two numbers. The program
accepts each number as input, displays each number and
the sum as output, and finally ends. This is just one example
of an almost infinite number of different student programs that
may be written using the Illustrated Computer's set of
instructions.
Notice that each line of the program has three parts: an
address, an instruction, and a comment. The "address" is the
memory location where the instruction is stored while in the
Illustrated Computer's memory. The "instruction" consists of
two pairs of numbers— generally an instruction and an ad-
dress. For example, 5020 in the first line of this program first
tells the Illustrated Computer to accept input ("50" is the
instruction for "input"), and then gives the memory location
where the input should be stored (at address "20" in the
Illustrated Computer's memory).
To encourage the development of good documentation
habits, the Illustrated Computer requires a "comment" for
each program line.
Once the program is in the Illustrated Computer's mem-
ory, you can return to the options list and select option [G] to
"RUN PROGRAM IN MEMORY." A screen display appears,
asking you to select video output only or video and printer
output. When you respond, the Illustrated Computer's input
and output units appear on the screen. The flashing cursor on
TRS-80 Microcomputer News, November 1983
17
the input unit indicates that the Illustrated Computer is ready
to accept the first of the two numbers to be added.
/S
msiM
SUSP!
Pill
ma?
As an example, let's suppose that you enter 1 246 for the
first number. 1246 is displayed on the screen as input, and
the cursor moves to the next line. Next, you enter the number
958. In a second, three numbers are displayed on the output
unit: 1246, 958, and the sum 2204. The box with status
information at the bottom of the screen tells you that the
program has ended because a "STOP" instruction was en-
countered in the program.
. jsp gap
m ^SSlB^^ '^i^^^mik/k
If you press fENTERl at this point, the options list will
reappear.
You can use option [C] to make changes in the student
program, or use option [F] to listthe program on the screen or
on the line printer.
Option [D] lets you save a student program on diskette
for future use. Option [B] erases the student program from
memory so that a new program can be entered (using option
[A]) or so that a previously saved student program can be
loaded into the computer from diskette (using option [E]).
Since the program has been run, option [I] is available.
This option displays the sequence of the last instructions
executed and gives more information on the ending status of
the program.
Option [H] displays all 100 of the Illustrated Computer's
memory locations, 50 locations at a time. If a student program
is in memory when option [H] is selected, the program in-
structions and any input or output will be shown in their
memory locations.
The Illustrated Computer is a versatile classroom tool for
introducing students to machine language programming
concepts. Once the student has learned the basics of work-
ing with the Illustrated Computer, the task of transferring the
knowledge for use with any computer architecture should be
relatively easy.
The Illustrated Computer (Cat. No. 26-2670) will be avail-
able soon through your local Radio Shack store or Computer
Center. Or contact your local Radio Shack Regional Educa-
tional Coordinator. The Radio Shack Education Division has a
nationwide network of 25 Regional Educational Coordinators
ready to help schools and districts meet their educational
computing needs. A complete list of these coordinators, their
phone numbers, and their addresses, is published every few (
months in the education pages of the TRS-80 Microcomputer
News. ^
18
TRS-80 Microcomputer News, November 1983
AgriStar
New Tool For Midwestern Farmers
by Thomas D. Deffke
Several M idwest corn and soybean farmers have discov-
ered a new tool to conserve a scarce and valuable commod-
ity—time.
The new tool is AgriStar, a dial-up electronic agricultural
business information network.
Farmers who use AgriStar rate market reports, market-
ing recommendations, and local weather information as the
most important information received from the AgriStar
service.
They value AgriStar for its ability to put all of this informa-
tion at their fingertips. They only receive what they need,
when they need it. No need to camp out next to the radio or
television to get the information necessary to make sound
marketing judgments.
USE OF TIMELY INFORMATION DETERMINES PROFIT
Receiving timely information and reacting properly can
make the difference between a profit and loss. Take the
example of a 700-acre Iowa corn farmer. In 1981 , he could
have sold his crop— with average yields— in a range from
$21 7,000 to $285,600. In Iowa, it cost him about $252,000 to
produce the crop. So, his net could have been a serious loss
of $35,000 or a profit of $33,600 ... or anything in between.
How would an Iowa corn and soybean farmer use
AgriStar?
Let's look back to July of 1 983. The Midwest was in the
middle of a heat wave with less than adequate precipitation.
The markets on the Chicago Board of Trade were extremely
bullish— prices were rising rapidly.
By accessing corn and soybean reports from the Chi-
cago Board of Trade, that Iowa farmer can view the daily
price trends. These reports are revised every 10 minutes
while the market is open. By typing: "Run CNS7 CNS9",
price reports were displayed immediately on AgriStar.
For example:
JLY
AUG
792
780
779
774
788
780
up 13
up 15
CORN FUTURES PRICES
07/22/83 12:45 p.m.
CNS7
High
i
Low
Last
Change
SEP
327
1/2
321
1/2
325 1/2
up 4
DEC
330
3/4
325
1/4
330 3/4
up 8 1/4
MAR
340
335
340
up 7 1/2
MAY
346
342
346
up 7 1/4
JLY
348
343
3/4
348
up 7 3/4
SEP
337
331
334 1/2
up 2
CBT SOYBEANS FUTURES PRICES
07/22/83 12:45 p.m.
CNS9
High
Low
AUG
717
706
SEP
727
715
1/2
NOV
744 1/2
733
JAN
759 1/2
747
1/2
MAR
774
762
MAY
782
772
Last
Change
717
up 16 1/2
727
up 17 1/2
744 1/2
up 16
759 1/2
up 16
773
up 15 3/4
782
up 15
ADVISORY SERVICES ASSIST MARKETING EFFORTS
Once that farmer has determined which direction prices
are headed, he must determine how to market his crops.
AgriStar provides marketing recommendations from advi-
sory services such as Top Farmer and Doane's. Here are
examples of the report he would have received last July.
TOP FARMER CORN STRATEGY TFS7
07/22/83 04:08 p.m.
Corn prices again made near limit gains.
Chart Guide: Friday's rally showed that Thursday's
choppy trading was not a reversal or sign of a tip.
But. prices remain very overbought with the relative
strength index well over 80 (70 is considered
overbought). Considering this along with all of the
exhaustion gaps the charts are almost predicting
rain. But until a reversal occurs the situation
remains bullish. Downward correction objectives fall
at each of the bullish gaps left by the rally. A 50%
correction would move the December contract to $3.00.
Outlook: We are maintaining a bullish outlook
near- term for both old and new crop. However, pricers
are very overbought and free stocks are not nearly so
tight, now that the trigger has been hit. Stocks will
increase to over a billion bushels if the $3.25 1982
trigger is hit. So the 1984 crop supply/demand
picture shows large carry over and adequate, if not.
burdensome, free stocks. Unless the weather situation
continues very dry for several weeks, we feel that
the December futures will fall to the mid-$2.00 area.
So do not fight the uptrend by turning bearish too
early but remain aware of the bearish potential.
Strategy: Because it is dangerous to fight a bullish
weather market, by selling futures too early, and
since bearish reversals have not yet occurred, it is
best to wait to advance sales. We recommend that all
producers delay making sales in either futures or
cash markets unless you have a large percentage of
your crops unpriced and are heavily leveraged.
Remember that prices are. at profitable levels, so it
is a good time to have at least part of your crop
sold. Forward contract, and pure hedge pricing should
be 60% and up to 80% complete for all crop to be sold
at harvest. Old crop is 70% to 100% priced.
TOP FARMER SOYBEAN STRATEGY
07/22/83 04:08 P.M.
TFS8
Soybeans made strong rallies and closed higher but
prices closed off the highs as profit taking took
place ahead of the weekend. Dry weather remains the
major bullish factor.
Chart Guide: The soybean situation remains very
bullish as price gains continue. But the many gaps
and a relative strength index over 80 (above 70 is
considered overbought) indicates that prices are
TRS-80 Microcomputer News, November 1983
19
extremely overbought. So we have to feel that prices
are in a exhaustion phase.
Outlook: We feel that the current rally is very
overdone in anticipation of continued dry weather,
rather than on current crop conditions. It is likely
that rains will occur before the corn crop is
significantly affected and before beans enter the
critical flowering stage. So the odds are the rally
will quickly end and prices typically fall faster
than they rally.
Strategy: Wait for further rallies and/or bearish
signals before selectively hedging new crop and
advancing forward contract and pure hedge pricing for
new crop. Also, wait for bearish signals to complete
pricing of old crop.
WEATHER REPORTS TOO
Price and marketing information are invaluable to the
corn and soybean farmer. But, another key service of AgriS-
tar is weather reports.
Weather reports and forecasts are available for local
counties, major cities, and even foreign countries. The Iowa
farmer, for example, can obtain local reports on growing
degree days, precipitation, and two-day weather forecasts.
These weather services can help determine planting,
harvesting, and tilling schedules.
AGRICULTURAL NEWS STORIES
But several factors besides weather can influence
prices. News stories which impact on prices are also availa-
ble on AgriStar. Samples of market impacting news items
include: USDA Reports, government trade talks and other
announcements.
World-wide agricultural news stories are currently gath-
ered and updated throughout the day by these three
sources: AgriData News Service (ANS), Commodity News
Service (CNS), and Des Moines Register. Other wire services
are being added.
To obtain news on specific subjects, the user only needs
to enter keywords. For example, the Iowa farmer could
punch the following keywords, "SNEWS.IOWA". He would
then be shown a menu of stories that he can choose from. By
entering the appropriate code number, he could then review
stories of major interest to him.
AgriStar is available at Radio Shack Computer Stores.
Interested farmers may stop by their local Radio Shack Com-
puter Center for a free demonstration.
AgriStar, besides being useful to the farmer, serves many
important needs of other agribusinesses such as grain eleva-
tors, ag banks, ag economists, equipment, chemical and
seed dealers, and many others. JS
lostic Tests
The following diagnostic tests are included in this issue
for use in checking out the PC-2. Next month we'll continue
with the PC-2 Assembly Language Series.
16K SYSTEM ROM CHECKSUM
This test will take approximately fifteen minutes to run. If
you are not using a printer, change the LPRINT statements to
PRINT
10 C =
20 A=&C000
30 B=PEEK A
40 C=C+B
50 IF A=&FFFF THEN 80
60 A=A+1
70 GOTO 30
80 IF C=2011609 THEN 110
90 LPRINT "CHECKSUM BAD"
100 END
110 LPRINT "CHECKSUM GOOD"
120 END
8K PRINTER ROM CHECKSUM
This test will take approximately nine minutes to run and
can only be done if you are using a printer.
10 C=0
20 A=&A000
30 B=PEEK A
40 C=C+B
50 IF A=&BFFF THEN 80
60 A=A+1
70 GOTO 30
80 IF C=1020020 THEN 110
90 LPRINT "CHECKSUM BAD"
100 END
110 LPRINT "CHECKSUM GOOD"
120 END
2K USER RAM TEST (STANDARD)
This test will take approximately two minutes to run. If you
are not using a printer, change the LPRINT statements to
PRINT.
C =
A=&4000
POKE A.90
B=PEEK A
IF B=90 THEN 70
C=C+1
IF A=&40C3 THEN 100
A = A+1
90 GOTO 30
100 A=&41BD
110 POKE A, 165
B=PEEK A
IF B=165 THEN 150
C=C+1
IF A=&47FF THEN 180
A = A+1
170 GOTO 110
180 IF C=0 THEN LPRINT '
190 IF C>0 THEN LPRINT '
200 END
120
130
140
150
160
USER RAM GOOD"
USER RAM BAD"
["Win
TEST FOR STRING FIXED MEMORIES
This test will take approximately one minute to run. If you
are not using a printer, change the LPRINT statements to
PRINT.
(Continued on page 32)
V
20
TRS-80 Microcomputer News, November 1983
Communication
ommunications Corner
by Al and Dru Simon
Hello, and welcome back to our corner. Since we've
gotten so many comments and letters having to do with
Bulletin Boards we've decided to devote another column to
some of the most frequently asked questions we've received
about this fascinating communications medium.
If you've never yet called one, (this seems almost impos-
sible these days!) let's review for a moment what Bulletin
Board Services (or BBS as they're often called) are and their
most common functions and options.
A BBS is usually operated by an individual microcom-
puter owner and is a small system which has been created for
public access via computer terminal. It generally consists of a
large number of programs which perform various functions
such as MESSAGE CREATION, DOWNLOADING and
UPLOADING, GAME-PLAYING, and the like.
The "heart" of each BBS is called the HOST program.
This is a program which will allow the BBS computer to
accept operating commands from a terminal at a remote
location through use of a MODEM. (See the article about
MODEMS in the August issue of Microcomputer News).
When you enter a command option such as QD for
MESSAGES to the BBS you have called, what you are doing
is telling the HOST program to call up the particular program
that OPERATES the Message section of that ^bulletin board.
The internal workings of Bulletin Boards consist of sev-
eral OPERATING programs. These are basically the "cogs
and wheels" of the system, allowing your commands (called
"remote input") to cause programs to be put into motion and
tying together each program with the HOST program. Each
Bulletin Board network accomplishes this "tying together" in
a different way, but essentially all the systems function in the
same basic manner.
Other programs within a BBS can be data files, which
might be programs for downloading, lists of other BBS num-
bers, lists of people who have called that board, and so forth.
They might be adventure games which the caller can play
while online, sales catalogues, general interest bulletins, or
any kind of data which the particular system operator decides
to include in his/her service.
Well, all that seems to be quite a lot of programs to stuff
into one little microcomputer! How much space does all this
take up? That depends entirely on the intent of the system
operator (also called sysop (pronounced SIS-op)). Some run
their boards using one or two 40 track disk drives, and some
use multi-megabyte hard drives for storage! The memory
capabilities of a board depend entirely on the whim (and
pocketbook!) of the person running it. It can be as small or as
' large as the sysop desires.
Many people seem to have an interesting picture in their
minds of what a BBS setup looks like. Some think of a huge
room full of whirring, clacking machinery, and others of an
ominous "Demon Seed" sort of setup.
Essentially, what makes up a bulletin board system is the
computer (of course), disk drives, and a printer on which is
stored various information about each caller. The information
which each BBS stores on paper (called HARD COPY) also
depends on the sysop. (You'll find that almost every aspect of
every BBS depends on what each particular sysop wishes to
do). Some keep records only of the names of each caller,
some keep caller addresses for mailing list purposes, and so
on.
DRUCOM keeps hard copy not only of each caller and
the time of his/her call, but of each activity the caller indulges
in, and the duration of the visit. In this way, we can monitor the
interest each section of our board holds and thus can elimi-
nate any section which is not used. We also keep records of
any messages which are left and who left them, in case we
come across some kind of problem in reference to any partic-
ular message. We also keep record of the caller number and
highest message number in our system, as a protection
against system failure and resultant loss of messages.
Just for interest's sake, we have duplicated a sample
section of our hard copy log, although we have "borrowed"
the name of the caller.
R.S. Tandy Fort Worth Tx. Clr#34698 Msg#2608
I am in Videotex using the 64 character mode
I entered Arcade at 08/08/83 10:45:22
I played Cia/Gam at 08/08/83 10:45:30
I Paged you at 08/08/83 10:57:02
I answered R.S. Tandy's page
I entered FXFER at 08/08/83 1 1 :07:30
I entered Color Computer download at 08/08/83 1 1 :07:40
I Standard Downloaded Direccc/ccc: Time 1 Minute 23 Seconds
I Standard Downloaded Dskscrtcc/ccc: Time 2 Minutes 4 Seconds
I entered Messages at 08/08/83 11:12:01
2608 INFO PLEASE To: DRU SIMON (Private Message)
Online Hours 42 minutes 19 seconds, off at 1 1:22 Am,
TRS-80 Microcomputer News, November 1983
21
The first line of the log entry is the caller's name, city, and
state, plus the number that the next message to be left will be
assigned, and lastly, what number caller his is. (In the two plus
years that DRUCOM has been online, we have received
close to 35,000 calls!). The next lines indicated that he has
called using Videotex in the 64 character mode. We are then
informed that the caller entered the game-playing section of
the board and used a file called "Cia/Gam." This tells us that
he played a certain game in that section, and the hour he
began to play. Most boards limit the time that games may be
played, for it is far too easy for a player to lose track of time
while on a BBS!
Next, we're told that the caller paged the sysop, and that
I answered his call. We obviously chatted for a few moments,
and then he went to the File Transfer section. It is noted by the
Filename assigned to it in the operating system, which in the
case of DRUCOM is called FXFER. He then entered the Color
Computer download section and took two public access
programs, both of which are named, so that we can tell which
programs are generating interest and remove those that are
not.
Next we can see that the caller entered the message
section of the board and left a private message to Dru Simon
with the title of "INFO PLEASE." As indicated on the top line,
that message was assigned the number 2608. The message
number on the first line of the next caller's log would of course
be 2609.
Lastly, we see that this caller logged off the board after
visiting for 42 minutes and 1 9 seconds, showing us the time
of his departure. In this manner we can closely follow the
activity of our BBS and keep abreast of our callers' wishes
and needs. Different sysops will keep different records of
each caller, depending on what that sysop feels is most
valuable to his particular BBS. We keep our hard copy log for
future reference and also keep hard copy of the messages
left in each of our message bases, in case anyone needs to
see them for some reason.
Now, you know basically what a BBS consists of and a
little bit about its inner workings. Let's talk about some of the
questions we've received about how you operate one once
you've connected your terminal to it.
HOW DO I LOG ONTO A BOARD?
Most boards require you to identify yourself in some
manner. Some ask for your name; some establish specific
account numbers with you, by which you are recognized as
yourself; and others carry "Logon codes." These are codes
which can be set up any way the sysop likes, and are kept in a
separate file on disk. They are much like account numbers,
and can be used either for specific security clearances or
merely to speed the entry of the caller onto the BBS.
WHAT DO YOU MEAN BY "COMMAND"?
Once your name has been entered into the computer,
you are generally offered a "menu" of options you can per-
form during your visit. These are the commands we spoke of
earlier; the "orders" you give the BBS to take you to the
Message base, or the Game area, or the Sales catalogue. If
you are unfamiliar with the list of commands of the BBS you
are connected to, these lists can be pretty intimidating!
SOMETIMES THE BBS DOESN'T PRINT OUT THE
WHOLE LIST OF COMMANDS. WHAT DO I DO THEN?
If you have called the board more than once, chances
are the HOST program will assume you are familiar with all the
command options, and present an abbreviated form of the
menu for you, which usually is just a list of the first letters of
each of the commands available to you. Don't despair how-
ever; for most BBSs offer you the option of printing out the
entire command list, sometimes by entering a CD CHDCED (for
HELP) and sometimes just pressing the Center) key will
do it. Most BBSs also offer a section specifically devoted to
instructions on how to operate the system you're calling. We
heartily recommend that you read them!
WHY DOES THE USER LOG SOMETIMES FORGET MY
NAME?
The user log is the list of callers that have used the BBS.
On many boards, this list is limited in size, and often the name
of the newest caller is written OVER the name of the oldest
caller. When you log onto a system, the program looks over
the user log, trying to match your name with any of those
already on the list. Thus, if you misspell your name, or use
your nickname instead of your full name, you will not be
recognized, since most BBS programs cannot extrapolate
full names from nicknames, or figure out that "Mkie" should
have been "Mike."
If you have not called in a long while, chances are that
your name might have been written over. On DRUCOM, it
only takes four days for your name to be eliminated! Don't
worry, however. Just because your name may not be recog-
nized, it does not mean that any messages for you will have
been erased. The message control programs and the user
log programs are two entirely separate things!
AHA, MESSAGES! HOW CAN I BE SURE THAT A
PRIVATE MESSAGE WILL: 1) REMAIN PRIVATE AND 2)
BE RECEIVED BY THE PROPER PERSON?
Good news and bad news. First, the way a message is
kept private is this: when you specify a message to be private,
a "flag" is placed on it which will allow it to be read only by the
person whose name EXACTLY matches the addressee.
There is an exception. On some systems, nobody can read a
private message except the addressee, but on others, the
sysop also has access to it, giving rise to the expression, "If
you can't trust your sysop, who can you trust?" (Oh, you
haven't heard that expression?)
Also, on some systems, the person leaving the private
message can read it during the same call in which he left it. If
he were to hang up and call again, he would no longer be
able to read that message.
The only way to ensure that the proper recipient receives
the private message is to make sure you SPELL HIS/HER
NAME CORRECTLY! You must be extremely careful in this.
On some boards you must include a person's ACCOUNT
number in the address. You must address your message to
the recipient in EXACTLY the same way he logs onto the
board! If you know that the recipient uses two different forms
of his name on two different boards, be very certain that you
are leaving it to the proper form for the particular board you
are calling, or the recipient will never be able to access the
22
TRS-80 Microcomputer News, November 1983
message! Computer BBS programs are still not sophisticated
enough to extrapolate the way people are. (Give them an-
other year or two!)
WHY DO I HAVE SO MUCH TROUBLE GETTING THE
SYSOP TO ANSWER THE "CHAT" SUMMONS?
This is a very common complaint. We're told very often
that it is almost impossible to get the sysop to actually get
online and chat, and even though we do try to answer the
summons on DRUCOM, we can't always. The answer is
simple. Sometimes the sysop is not home; many have outside
jobs and simply are not around often enough. Others turn off
the summons when they have visitors, or are too busy with
some other activity. Admittedly, sometimes sysops just don't
feel like answering, and while on the surface this might seem
selfish and rude, it would be wise to remember that many
people call boards, and many page the sysop. It's simply not
feasible for us to sit at home all the time and wait for the
summons, and after chatting with five or six people in a row, a
sysop can really need a break! (Wait, I have to stop writing this
article, my CEDage summons is buzzing!)
WHY DO I SOMETIMES GET GARBAGE WITH MY
TRANSMISSIONS?
Several things can cause those funny little characters
which you know you aren't sending deliberately. One of these
can be a problem we discussed in the August issue, called
Carbon Packing, where the carbon in the telephone micro-
phone gets packed too tightly and causes trouble in the
clarity of the signal transmitted through the acoustic modem.
Another cause of garbage can be poor phone connections,
improperly set parameters, or interference from bad weather.
When in doubt, check your parameters first and your acous-
tic modem second.
WHEN I TRY TO CALL, FIRST I'LL GET A BUSY SIGNAL,
THEN WHEN I CALL BACK IN TWO MINUTES IT WILL
RING AND RING AND NOT PICK UP. WHY?
Most BBS are very busy places and receive many calls.
When a caller terminates his connection, the BBS programs
recycle themselves, resetting variables and going back to
their "wait for call" modes. This recycling can sometimes take
30 seconds or more, and this is why the modem does not
seem to answer. If you connect to a BBS just at the moment
when the previous caller hangs up, you may have to wait until
the program finishes recycling.
Another reason that the modem may not answer is that
the sysop might be on the system him/herself, updating files,
doing daily maintenance, and answering mail. Sometimes,
during a busy day, the sysop will just turn off the modem to
avoid interruption, and this too may be a reason you cannot
get the machine to answer.
There is always a third reason, however. The system may
legitimately be out of service for some reason. If you have
called a board several times and not gotten the machine to
respond, perhaps it might be time to call the sysop's voice
line (if you know it) and bring the matter to his/her attention.
SOMETIMES IN THE MIDDLE OF MY BBS VISIT MY
CONNECTION WILL SUDDENLY BE LOST. WHY?
This sudden termination can often be caused by weather
or the "Call-Waiting" options which are available through Bell
Telephone. This might also be caused if the BBS local phone
switching station has older equipment which is not capable of
handling too many call attempts on any single line. Momen-
tary power failure or power surge on either end of the connec-
tion may also have such an effect.
WHAT DOES IT COST ME TO VISIT A BBS?
While there is a fee for services like CompuServe, usually
there is no charge for a visit to a privately run BBS. Some do
require membership fees, and some sell various items to
support the costs of running the board, but for the most part,
the only thing you pay for is the telephone call, which of
course, the sysops do not get any percentage of.
WHAT ARE THE COSTS OF RUNNING A BBS?
Generally speaking, aside from the obvious price of the
hardware needed to run a BBS, the costs are minimal. The
monthly costs are mainly the phone bill, (which is minimal
indeed if the phone is not used for outgoing calls), the disks
themselves, which must be replaced monthly because of
general wear and tear due to constant use, the paper for the
hard copy, and the sysop's time. What the latter is worth is a
variable thing, but it usually is the commodity that the BBS
uses the most of! Computers use very little electricity, so little
that it can hardly be considered a serious cost of running a
BBS.
DO YOU HAVE TO BE A PROGRAMMER TO RUN A BBS?
No, but we must admit that it helps! While there are
various BBS software packages available already pro-
grammed, most sysops like to "customize" theirs, to make it
somewhat unique. Also, various factors may cause errors in
some of the programs, and it is wise to be able to "trouble-
shoot" these on your own, without having to call the head-
quarters of the network you belong to and spend a lot of
phone time repairing any trouble you might come across.
WHAT DOES IT TAKE TO MAINTAIN A BBS?
A lot of time. Daily maintenance on a BBS ranges from 1 5
minutes to two hours or more, depending on the type of work
that needs to be done. A sysop must not only answer the mail
that he/she gets but must also maintain the files, update any
changeable data (other BBS numbers, price lists etc), keep
working backup disks, correct errors, and rotate changeable
menu items (download files for example). Sometimes parity
errors occur and will cause the system to "lock up," and
these errors too must be located and corrected. These cost
more in time than anything else, and along with time, the
sysop must also have a lot of patience!
WHAT MAKES A PERSON DECIDE TO BE A SYSOP?
After reading the above paragraph, we're no longer
sure . . .
NO, SERIOUSLY, WHAT DOES A SYSOP GET OUT
RUNNING A BBS?
A variety of things. Some sell hardware and software
over their boards, and thus supplement their income. Some
run them for the express purpose of meeting other people.
Others run them for Special Interest Groups of various types
and keep the members of their groups informed as to club
TRS-80 Microcomputer News, November 1983
23
activities etc over their BBS. Some sysops just plain enjoy
being the person who is able to read all the messages!
We started DRUCOM over two years ago simply be-
cause we were tired of having such a huge phone bill from
calling other boards! Gradually our board grew until it is in its
present state, and we learned that there is one more benefit
that a sysop gleans from a board: FUN!
It's fun to have a lot of people come visit you and leave
messages to each other and yourself. It's entertaining to be
able to speak to many people across the country and get to
know something about them, and it's an interesting way to
accumulate public domain programs; as sometimes callers
upload programs in return for those the BBS provides them
for free downloading.
WHAT DO I NEED TO START A BBS?
A whole lot of patience, quite seriously. Beside the com-
puter, disk drives, modem, printer and phone line one needs
a whole lot of patience and dedication.
Running and maintaining a system (which by nature
uses the intermingling of a number of fairly complicated
programs both in BASIC and Machine Language) takes a
very large amount of time, energy, and caring. Maintenance
must be done every day, and if the sysop is involved in other
things, (work, social life, sleep) he/she can find a BBS to be a
demanding and interfering burden. The "glory" of being a
sysop can be a very alluring thing, but in reality it takes just as
much time, energy and effort as any other profession. We
usually try to discourage inexperienced people from starting
up a BBS, especially if they are not experienced program-
mers, because we feel that they will become disillusioned
very quickly. Our recommendation is that if you are interested
in Bulletin Boards— visit them! They're a wonderful place
to go!
If you have any other questions that we have not an-
swered in the above article, please feel free to write to us, and
we will be very pleased to respond to you!
That will wrap it up for this month. Since this article has
been devoted entirely to answering questions about Bulletin
Boards, we will omit this month's Corner Mailbox and hope to
hear from you soon with any further questions you may have.
Happy Communicating! JEl
Converting Programs
from Model III Disk
BASIC to Model 4
Disk BASIC
By Randy Rife
TRS-80 Model III programs will run without modifica-
tions on the new TRS-80 Model 4. However, when we do so,
the Model 4 works just like a Model III and our old programs
cannot use the 80-character screen width, sound,
MEMDISK, and other features unique to the Model 4.
TRSDOS 6.0 has a convert utility that will transfer any disk file
(including a BASIC program) from TRSDOS 1 .3, but there is a
catch.
BASIC programs are normally stored in compressed
format on the diskette with BASIC keywords reduced to a
single byte (these are often called tokens). When
TRSDOS 6.0 converts a file from TRSDOS 1 .3, it copies the
bytes in the file as opposed to the keywords. The problem
with this process is that TRSDOS 6.0 BASIC uses different
tokens for storing keywords; e.g., when converted, REM is
stored as LIST, GOSUB is stored as PRINT, etc.
To overcome this problem, BASIC programs must be
stored in ASCII format before using the convert utility in
TRSDOS 6.0.
Here is a sample session to convert a BASIC program
(named TEST) to TRSDOS 6.0 Disk BASIC.
Save the program on the TRSDOS 1 .3 diskette in ASCII
format by entering:
SAVE"TEST/ASC",A
Next, put that TRSDOS 1 .3 diskette into Drive 1 , p ut a
TRSDOS 6.0 diskette into Dive and press fRESET) . At
TRSDOS Ready, enter
CONV TEST/ASC:1 :0
When that is finished, enter BASIC and then enter LOAD
"TEST/ASC". List, edit, and run the program as needed.
When satisfied with the program, save it back onto the disk-
ette and kill TEST/ASC.
The convert process will only create a loadable BASIC
program; it does not correct any syntax or logical errors.
Keep in mind that TRSDOS 6.0 Disk BASIC requires spaces
after keywords; e.g., GOSUB100 will not work. Some
functions have been replaced; e.g., CMD"D:0" is now
SYSTEM"DIR :0", and other statements have been elimina-
ted; e.g., SET and RESET do not exist in TRSDOS 6.0 Disk
BASIC.
This conversion process should only be done on pro-
grams written by yourself and after you have a good under-
standing of TRSDOS 6.0 Disk BASIC. ^1
24
TRS-80 Microcomputer News, November 1983
Transferring Data
between the Model 100
unci triG 3i aj.i
You may transfer data between the Model 100 and the
Model III using VIDEOTEX PLUS on the Model III and the
TELCOM program on the Model 100. Model 100 programs
must be stored in ASCII format (files with a .DO extension-
either Text files or else BASIC program files SAVEd with the A
option).
First, make the preliminary hardware and software con-
nections by following these steps:
1 . Connect the two computers via an RS-232C Cable
(26-4403) and a Null Modem Adapter (26-1496).
2. Insert a VIDEOTEX PLUS Diskette into the Model III.
Press RESET then type VIDTEX. Upon doing so, the
message "DATA CARRIER LOST" will appear on the
screen.
3. Simultaneously, hold down the (shift) . CD, and
Cm) keys to reach the TERMINAL MENU. Type CHD to
check the status. The following values should be en-
tered for the Model III status:
BAUD: 55
UART: 6D
DUPLEX: H(ALF)
XON/XOFF: Y(ES)
4. To get to the TERMINAL Mode, press CeWt er) . The
message DATA CARRIER RESTORED will appear on
the screen. (This message will not appear, however,
unless the Model 100 is in TELCOM set up to the
RS232 in TERM Mode.)
5. On the Model 1 00, move the Menu Cursor to the word
TELCOM and press Center] . The TELCOM
prompt will appear. Press STAT (COD) and type:
C3DdDCHDCjrJCnD Center) .
This sets the Model 100 communication parameters
to match the parameters you previously set on the
Model III.
6. Enter the Model 100 Terminal Mode by pressing
TERM (CZ3D). Now that the Computers are con-
nected and have matching communication parame-
ters, you may transmit files to and from the two
machines.
DOWNLOADING FILES FROM THE MODEL III TO THE
MODEL 100
To download a Model III file to the Model 100, follow
these steps:
1.0n the Model III, simultaneously press the
(shif T) .m. and the (ID keys to reach the
TERMINAL MENU. Once in the menu, press CD to
load the RAM buffer.
2. Once again go into the TERMINAL MENU on the
Model III and press QD to transmit data.
3. On the Model 1 00, press DOWN ((TTD). TELCOM will
prompt you for a file name. Enter the name of the new
file, using the .DO extension (TELCOM will add this
extension if you don't supply it), then press
appear in reverse
(enter) . The label DOWN wi
video.
4. When all of the data has been transmitted, press
COD on the Model 100 to exit the Terminal Mode.
When prompted DISCONNECT?, press CZD, then
(ENTER) .
The Model III file is now stored in the Model 100's
memory under the file name you specified.
UPLOADING MODEL 100 FILES TO THE MODEL III
To transmit a Model 100 file to a Model III, follow these
steps:
1. Enter the TERMINAL MENU on the Model III by
simultaneously pressing the (shift) . CD, and the
CMD keys. Open the RAM buffer by pressing C£D.
2. Again enter the TERMINAL MENU and zero the RAM
buffer by pressing (ID-
3. On the Model 100, press UPLOAD (CEO-
4. TELCOM will then prompt you for width. This refers to
the maximum number of characters transmitted be-
fore transmitting a carriage return. Enter an appropri-
ate value, then press (enter) . Remember that the
Display on the Model 100 is 40 characters wide.
If you want to send the file "as is," simply press
(ENTER) .
5. As the file is transferred, the Up label appears in
reverse video and the transmitted data appears on the
Model III Screen.
6. When the transmission is complete, the Up label re-
turns to normal video.
7. On the Model III, simultaneously press (shift) .
QD and CMD to return to the TERMINAL MENU. Now
press LTD to close the RAM buffer. To save the file,
return to the TERMINAL MENU and press GD. Type
the file name and press (enter) . To exit the Termi-
nal mode, enter the TERMINAL MENU ( (shift!
CTD CM]) and press QD to exit.
8. To exit the TELCOM program on the Model 1 00, press
( F 8 ) to exit the Terminal Mode. When prompted
DISCONNECT?, press CS and (enter) . Now
press COD again to return to the Main Menu.
The Model 1 00 file is now stored on your Model III disk,
under the specified file name. JH
sssssssBisistr
TRS-80 Microcomputer News, November 1983
25
VIS-Video
Informatio
nd Office
stem
You've been going through the arduous and
sometimes disheartening task of finding a new
home without much success. After long hours of
discussion, you've finally agreed on the type of
home you want, the area that you want to live in,
and how much you are willing to pay. Armed with
this information, you return to your realtor's office
where you expect to spend another afternoon sift-
ing through a dog-eared Multiple Listing Service
book in the hope of finding something suitable.
Instead of handing you the book though, she sur-
prises you by asking you to fill in a short form that
requests the pertinent information on the kind of
house you want to purchase. You indicate the fol-
lowing features and financial information on the
form.
1. Three bedroom house, two bathrooms and
a two car garage.
2. Ranch style home
3. Located in the Bedford, Texas area
4. Built before 1980
5. Cost of 75 to 80 thousand dollars on a long
term loan.
6. Have accumulated $10,000 toward a
down-payment.
7. Specifically, you want an all electric home
with built-in kitchen appliances on an island.
You would prefer bay windows, a fireplace,
and a separate family room.
Your realtor uses her TRS-80 computer to call
the central VIS network which contains all the
homes in her marketing area. Within a few short
minutes she has a cross referenced list of homes
that meet your requirements. You look over the list
and choose two different homes that interest you.
She then enters some more information on her
TRS-80. When she finishes, she provides you with
the complete information about the two homes in-
cluding floor plans drawn to scale, front views of the
houses, and complete payment schedules based
on your initial down-payment of $10,000 with a
payback period of fifteen or twenty years. You note
that the payment schedules are derived from the
current lending rates of local lending institutions in
your community
Before ever actually seeing the homes, you
have a more complete profile of them and also what
your financial obligations are. What a pleasant sur-
prise. What you expected to take all afternoon has
only taken a few minutes.
Typical VIS Installation
Up to 256 different
"Customers" pro-
vide and update
the information
that will be ac-
cessed by the end
users
The "System Op-
erator" maintains
each customer's
database indepen-
dently to ensure
privacy
Model 12
zs*
Model 12
5 H
Model 12
Modem
^
Model 12
Systems with high activity
can expand with multiple
workstations or terminals
A Communications Multi-
plexor is used to allow us-
ers simultaneous access
to the system over several
incoming phone lines
Modem
Each customer's user
base can obtain the de-
sired information using a
variety of computers and
terminals
Modem
Modem
Modem
-^
Model 16B
Hard Disk
^
Multiplexor
Data is transmitted
over standard tele-
phone lines using
300-baud modems
/ J
Model 12 | / c° lor .
Computer
26
TRS-80 Microcomputer News, November 1983
Private Internal Videotex System
The Information Sys-
tem Manager func-
tions as both the
System Operator and
as the Information
Provider.
This configuration is an ideal office information system.
"Tiering" restricts certain users from accessing confidential
information.
Mass Market System
Model 12
-//-
Customers offer paid-
subscribers specific in-
formation services.
Model 16B
Model 12
y/-
Model 4
£
The System Operator
charges customers
according to usage,
file space, or both.
Model 12
Model 4
Model 12
5
Model
00 j
r
Other
Subscribers deal directly with the appropriate Customer — the
System Operator is effectively "user transparent".
Welcome to the world of Videotex Infor-
mation Service (VIS)! The information pro-
vided by the realtor wasn't difficult for her to
obtain from the central VIS system either. She
used "Topical Reference Words" that meant
something to her and you alike: 3-2-2, ranch,
all electric, Bedford, 75K, 80K, 1980. This,
then, is the marvel of VIS. Words combined in
a logical manner returned to the realtor infor-
mation quickly and efficiently. She didn 't ha ve
to be a computer specialist to use VIS either.
Real Estate as one example of the utiliza-
tion of VIS can be duplicated for many equiv-
alent applications. One of the many powers of
VIS is its flexibility. Whether you want a graph-
ics delivery system, a software .distribution
center, or a text retrieval system, you can
tailor VIS to your needs.
PRESENTING RADIO SHACK'S VIS
The Videotex and Office Information Sys-
tem (VIS) is designed for storing, retrieving, and
distributing information. It offers state of the art
technology at prices that are a fraction of the
comparable systems. In fact, some of the
features of VIS, such as multiple keywords/
synonym access, are not available on any other
system at any price.
AN UNDERSTANDING OF VIDEOTEX
VIS, as with all videotex systems, is a two
way interactive system that transmits electronic
information directly to information consumers,
or "users." With VIS, users may be a select
group, the general public, or both. Any terminal
or computer with terminal capability may be
used to receive and display text and, if compati-
ble, graphics and computer programs. Estab-
lishing and organizing the data are the
information providers, or "customers." Custom-
ers define their user population, sell or provide
information and information updates, and es-
tablish any security access rules.
At the heart of VIS is the information service
manager or "system operator." The system op-
erator maintains the computer hardware and
VIS software for either a single customer or for
multiple customers. The system maintains com-
plete independence between customers, en-
suring information privacy.
A LOOK AT THE TECHNOLOGY
Radio Shack's involvement with Videotex
began in 1 977 when our TRS-80 Videotex tech-
nology was selected for use in the govern-
ment's "Project Green Thumb" program. This
system provided farmers with the up-to-date
agricultural information they required to stay
ahead in such a volatile industry.
Today, Radio Shack's VIS couples ex-
tremely user-friendly software with our state-of-
the-art TRS-80 Model 16B microcomputer.
TRS-80 Microcomputer News, November 1983
27
Utilizing both MC68000 and Z-80 micropro-
cessors, the Model 16B accepts 16-bit data
and processes it internally as 32-bit "words."
Along with our TRS-80 Communications
Multiplexor and over 45 megabytes of hard
disk storage, the TRS-80 Model 16B be-
comes the hub of the most cost-effective vi-
deotex system ever developed.
Using VIS to
Your Advantage
VIS can be used within your business or
within your business environment.
OFFICE INFORMATfON SYSTEM
As a Private Internal Videotex System
(PIVIS), VIS can meet the requirements of an
information storage and delivery system within
your company's internal operations. Using a
computer in your office, or a portable terminal
from thousands of miles away, VIS could let you
check factory orders against usable inventory,
corporate sales figures and production capac-
ity, client or patient reports, and much, much
more.
MASS MARKET SYSTEM
As a Mass Market System (MMS), VIS can
be used as a "public" data base in which paid
subscribers are allowed access to data such as
news, weather, and stock reports. Airline
schedules, real estate multiple listing directo-
ries, and credit bureau information are just a few
of the many services possible with VIS.
In both configurations, tiering permits the
customer to charge each user by the specific
services requested. It is important for both MMS
billing purposes and for PIVS inter-departmen-
tal charges.
Typical VIS Applications
ARCHIVAL/INFORMATION RETRIEVAL
SERVICES
Legal Information— case searches
Pharmacological Data Base— drugs, medi-
cines, herbs, vitamins, etc.
Insurance— policy searches, client data
Library Card Catalogs
"Encyclopedia" Research Data Bases
Inventory/Catalog Lists
Telephone Directories— with cross listings
and consumer advertising
CONTINUOUSLY UPDATED SERVICES
Educational Records— Rolls, Class Sched-
ules, Student Records
Agricultural Data Services
Periodicals— newspapers, magazines, etc.
VIS Request Look-Up Process
Spelling
Variants
k
Topica
Reference
^vc
^ LAGUSTRUM \
^ Request Words
LEGUSTRUMO^
^LUGUSTRUMV^^J
^\\\\\\\\\\V\
Exact
Match
VIS
Directory
TULIP
TREES
LIGUSTRUM
HOLLY
LAUREL
ROSE
Search
for "Best'
Match
■could be
Title
Keyword
Synonym
Documents
VIS Database
V
28
TRS-80 Microcomputer News, November 1983
Title, Keyword and Synonym Relationships
Documents
HARDWOODS
Keywords
FOREST
WOODS
Synonyms
BUSHES
SHRUBS
SPRUCE
OAK
DOGWOOD
ELM
HICKORY
PINE
MAGNOLIA
TULIP
DAISY
ROSE
HOLLY
LIGUSTRUM
LAUREL
CONIFERS
Keywords
! Documents ■
i i
VIS will attempt to process the user's request for informa-
tion on ligustrums whether spelled correctly or not. The
document is displayed because "Ligustrum" is the actual
document's title. If the keyword "shrub" or its synonym
"bushes" had been used, ligustrum would have been dis-
played along with related documents.
Mailing Lists
Classified Advertising
Financial Services— Banking, Stocks
SPECIALIZED SERVICES
Computer Program and Arcade Systems,
Maps, Surveys, Charts, and other Graphics,
Government Data Bases— voter and tax rolls,
auto license/title, etc.
Retrieving Information
with VIS
Because VIS performs all terminal interac-
tions and data retrieval capabilities, anyone can
carry out sophisticated computer data base
applications with no prior experience.
The process begins when the user enters a
request on a TRS-80 desktop computer,
TRS-80 portable computer, or TRS-80 terminal.
VIS receives the request, retrieves the desired
data and formats it according to the user's com-
puter or terminal. Finally, the data is transmitted
to the user where it is displayed one screen at a
time.
VIS RE-DEFINES "USER FRIENDLY"
VIS is incredibly easy to use. But, beyond
simple operation, VIS actually helps the user
through the system. It is tolerant of user mis-
takes to the point that it will accept misspelled
words or retrieve alternatives based on pho-
netic similarities!
This feature is illustrated in the VIS Request
Look-Up Process chart, but it is first necessary
to define some of the concepts used in VIS
operation.
A "document" is a unit of information
stored in VIS by a specific name or "title." Re-
lated documents can be grouped into catego-
ries called "topical references."
A user may request a document by enter-
ing the title, or by using a "keyword," which is
merely a word used as a cross reference.
It is important to point out that a user does
not have to know either the title or a correct
keyword to access a particular document. For
example, a user could enter "woods" and be-
cause it is a "synonym" for the keyword "for-
est," gain access to documents pertaining to
trees.
MULTIPLE REFERENCE REQUESTS
VIS features logical operators that add an
incredible degree of flexibility in requesting in-
formation. A user requesting information on two
topical references, such as "trees flowers,"
could possibly receive more information than is
needed. Logical operators (and, or, exclusive
or) permit the user to target in on exactly those
documents required— quickly and easily.
TRS-80 Microcomputer News, November 1983
29
Data Base Organization
The extremely simple operation that is ex-
perienced by the information consumer is ex-
tended to the information provider, as well. In-
deed, a customer can rely on relatively
untrained computer personnel to maintain the
data base.
AS EASY AS WORD PROCESSING
The customer prepares the text of each
document with a text editor or word processor
such as Radio Shack's SCRIPSIT Anyone who
can use a text editor— from editors to clerks to
new personnel who can be self-taught in a
matter of days can create your data base.
After a document is prepared by supplying
simple items such as the document title, key-
words and synonyms, the VIS Edit/Maintain
program is used to insert documents into the
VIS data base.
For security or billing purposes, docu-
ments can be assigned a specific access level
and price. Thus, Level 1 users will only be able
to access level 1 documents, while Level 2
users can access both Level 1 and Level 2
documents, and so on.
THE MENU FOR SUCCESS
Unlike many systems, customers can
setup VIS to include concurrent menu/
keyword document access. Menus offer "user
friendly" operation to those who have little or no
experience with data base systems. However,
menus can also be viewed as time-consuming
obstacles by experienced users. That's why VIS
permits one user to access a document by
utilizing menus while another user accesses the
same document directly— using keywords and
synonyms.
VIS also features such important functions as full logging
of user responses, graphics capabilities, and the ^ability to
send and receive computer programs, as well as text.
Managing System
Information
VIS provides all of the "tools" that a system operator
needs to establish and maintain an efficient VIS data service
for every customer. These include data base structural analy-
sis and management tools as well as a data log maintained for
billing purposes.
VIS DOESN'T TIE UP YOUR RESOURCES
All that is required to set up a basic VIS system is
Radio Shack's 2-disk TRS-80 Model 16B with 384K RAM, a
1 2-megabyte hard disk system, two modems, and VIS software.
This configuration is ideal for a Private Internal Videotex System
because data is entered through the Model 1 6B itself. While this
is an incredibly affordable system, it should be noted that it can
Basic VIS Configuration
Model 16B
=\
Hard Disk
L
r m
300 Baud
Modems
_ ,
300-Baud
Modems
_J
Model
Model 12
Color
Computer
I Model I
•-1-100 -r-J
Other
Information Consumers
at Remote Locations
handle up to 200 incoming calls a day (assuming each call
averages between five and ten minutes each over a 24-hour
period).
From this basic configuration, a system can expand as
necessary. Ultimately, the system operator can provide service
to as many as 256 Information Providers (customers) per sys-
tem. Additional hard disks, each storing about 24,000 frames of
51 2 bytes each, can be added until the system could store all of
the information contained in a complete set of encyclopedias.
The TRS-80 Communications Multiplexor with either 8 or 16
ports could be added to handle more incoming calls— approxi-
mately 1 00 calls (5-10 minutes each) per port daily A total of four
multiplexors can be used to handle even more incoming calls.
GRAPHICS AND PROGRAM DOWNLOADING
VIS supports alpha-mosaic and alpha-geometric graphics
protocols concurrently. Furthermore, various error detection
techniques (as defined by the system operator) allow for the
dissemination of computer programs. This flexibility makes a
broad base of applications and services available to computer
and terminal users.
30
TRS-80 Microcomputer News, November 1983
Super VIS Configuration
Model 12
5
Model 12
Model 12
Modems
1200-Baud
Modem
Model 16B
El
fi
n Hard Disk |
DT-1
Terminal
Additional 12-Meg
Hard Disk Systems
Multiplexor
Multiplexor
i
Communications Via
Standard Phone Lines
'Model 4 Model 12
Z_7
Computer
Information Consumers
at Remote Locations
ON THE THRESHOLD OF TOMORROW
Radio Shack will continually enhance the perfor-
mance features of VIS. System operators will be able
to add increased functionality as it is developed. In
most cases, enhancements will require no further
hardware investment. Electronic mail, electronic
shopping, catalog sales, bulletin boards, and finan-
cial analysis services— all are examples of what the
VIS system operator can look forward to.
Videotex Office
and Information
System-Technical
Overview
VIS SOFTWARE
VIS was developed in highly modular form in the
"C" programming language and features an ad-
vanced Back-Up and Recovery system. It is de-
signed to be a continuously evolving product, with
software enhancements made available to all system
operators.
The fundamental unit of storage in VIS is the
document, which also controls delivery to the users.
Documents have no maximum size restriction, and
may contain text, graphics, or computer object pro-
gram. ASCII text is compressed, and stored on disk in
1 28-byte units (one page of single-spaced text would
equal about 10 units). The compression technique
used for ASCII data yields from 25% to 33% more
disk storage space. Thus, Radio Shack's 12-mega-
byte hard disk systems can effectively store 1 6 mega-
bytes of text.
Graphics and computer object programs are not
compressed and are stored in a separate file from text
documents (as are titles, keywords, and synonyms).
COMMUNICATIONS MULTIPLEXOR
The TRS-80 Communications Multiplexor is
available in two versions. The 8-port version accepts
eight incoming phone lines, while the 16-port version
accepts 16 lines. Thus, each multiplexor in a VIS
system (a total of four can be used) can service up to
sixteen users simultaneously.
Each multiplexor features 8 or 16 built-in auto-
answer modems, a 50-pin RJ21X telephone jack,
and two RS-232C serial ports.
HOST COMPUTER
VIS is designed for use with the Radio Shack
TRS-80 Model 16B microcomputer and the
TRS-XENIX multi-user operating system. TRS-XENIX
is derived from the powerful UNIX operating system
developed by Bell Laboratories.
Model 1 6B incorporates two (and soon five) RS-
232C serial communications interfaces and a parallel
printer interface and can expand from 256K (stan-
TRS-80 Microcomputer News, November 1983
31
dard) to 768K of Random Access Memory. VIS can also be
used with the TRS-80 Model 1 6 (with a maximum of 51 2K and 2
ports) and with TRS-80 Model 12 computers that have been
upgraded to Model 16 capabilities.
CUSTOMER/USER COMPATIBILITY
VIS is compatible with a wide variety of TRS-80 products.
Information providers can use any TRS-80 disk-based com-
puter, such as a Model II, 12, 16 or 16B, to maintain their data
base. Other compatible computers and communications termi-
nals may also be used.
Information consumers can use any TRS-80 computer,
such as the TRS-80 Color Computer or TRS-80 Model I, II, III,
4, 12, 16, 16B desktop computers with a 300-baud modem.
The TRS-80 Model 100 portable computer with built-in modem
may also be used, as may many other compatible computers. If
a full-function computer is not needed, users can employ
Radio Shack's TRS-80 Videotex terminal, PT-21 Portable Print-
ing Terminal, DT-1 Data Terminal with modem— or virtually any
other available terminal. The DT-1 requires an external modem.
PC-2 Tests
(From page 20)
10 CLEAR
20 C =
30 A=30912
40 POKE A, 90
50 B=PEEK A
60 IF B=90 THEN 80
7 C=C+1
80 IF A=30975 THEN 110
90 A=A+1
100 GOTO 40
110 IF C=0 THEN LPRINT "SYSTEM RAM GOOD"
120 IF C>0 THEN LPRINT "SYSTEM RAM BAD"
130 CLEAR
140 C=0
150 A=30288
160 POKE A, 90
170 B=PEEK A
180 IF B=90 THEN 200
190 C=C+1
200 IF A=30463 THEN 230
210 A=A+1
220 GOTO 160
230 IF C=0 THEN LPRINT
240 If C>0 THEN LPRINT '
250 CLEAR
260 C=0
270 A=30544
280 POKE A,90
290 B=PEEK A
300 IF B=90 THEN 320
310 C=C+1
320 IF A=30719 THEN 350
3 30 A=A+1
340 GOTO 280
350 IF C=0 THEN LPRINT '
"DISPLAY CHIP
"DISPLAY CHIP
3 GOOD'
3 BAD"
10 CLEAR
20 C =
30 A=31000
40 POKE A, 90
50 B=PEEK A
60 IF B=90 THEN 80
70 C=C+1
80 IF A=31183 THEN 110
9 A=A+1
100 GOTO 40
110 IF C=0 THEN LPRINT
"SYSTEM RAM GOOD
120 IF C>0 THEN LPRINT
"SYSTEM RAM BAD"
130 END
DISPLAY CHIP TEST
This test will take approximately ten seconds to run. The
LCD display should fill-up with dots. If you are not using a
printer, delete line 110 and change line 120 to 110.
10 A=&7600
20 POKE A, 255
30 A=A+1
40 IF A=&764E THEN 60
50 GOTO 20
60 A=&7700
70 POKE A, 255
80 A=A+1
90 IF A=&774E THEN 110
100 GOTO 70
110 LPRINT "END"
120 END -sisl
"DISPLAY CHIP
360 IF C>0 THEN LPRINT "DISPLAY CHIP
370 LPRINT "END OF TEST"
380 END
4 GOOD'
4 BAD"
TEST FOR NUMERIC FIXED MEMORIES
This test will take approximately thirty seconds to run. If
you are not using a printer, change the LPRINT statements to
PRINT.
32
TRS-80 Microcomputer News, November 1983
CompuServe
Computers In Hotel/Motel Rooms:
A Traveler's Best Friend
Editor's Note: The CompuServe Information Service is
one of the largest information and entertainment services
available to owners of personal computers and computer
terminals. With each issue of TRS-80 Microcomputer News,
various features of CompuServe will be discussed. The
CompuServe Information Service is sold at Radio Shack
stores nationwide and in Canada.
The first thing a person does when he checks into a hotel
or motel room is take inventory of the room. Ah, one double
bed, color television set with HBO, nice view, closet, bath-
room, phone— and a computer?
That's right! A computer. More than ever, traveling
businesspersons can either carry a computer, such as a
TRS-80 Model 100, or find one making itself at home in their
room when they arrive.
But what's there to do with a computer when one is
traveling around on business? Especially if that trip only takes
you out of town for maybe one or two nights. It's difficult to
start any really big projects, and who can you get in touch
with after hours even with the luxury of the computer?
Well, the technology of videotex, aided by CompuServe,
can help those traveling business personnel in ways they
probably never thought of. At the end of the big meeting, after
the last letter is recorded and after you have shut your brief-
case and filed the statistics report, CompuServe can wel-
come you to the world of videotex.
But first of all, what is videotex? Videotex is— generic.
Yes, that's right. The truth of it is, it's another generic. Just like
"Kleenex", "Graham Crackers" and "Dog Food."
The true identity of videotex is a two-way, interactive
system that transmits electronic information (text and graph-
ics) directly to you, the mass medium consumers. Videotex
users and their computers or computer terminals interact with
a main computer by using a key pad, push button console, or
full typewriter-like keyboard to transmit signals to the main
computer via cable or telephone lines. Information is sent to
your computer equipment at your home or office and is
displayed on your hotel TV screen or other video display unit.
As in any videotex operation, CompuServe's information
is prepared by individual information providers who work
with programmers and research specialists in formatting the
material into videotex reading form.
They then put it up into the main computer systems
which you are able to access. Or, in some cases,
CompuServe will switch the customer to a computer in an-
other location. The efforts of CompuServe's staff allow con-
sumers to search a database, send and receive inquiries,
shop, or bank at home.
The costs involved in being a videotex user usually in-
clude cost of communications, the telephone charges
(mainly paying for the local call from your room or if the call is
long distance), the computer connect time and, any extra
charges for premium videotex services.
Some people wonder what the difference is between
videotex and videotext. Videotex and videotex(t) are one in
the same. If you were in Britain, you'd be using the Prestel
videotex system operated by the government postal and
telephone service. In France, Telematique, also operated by
the government postal and telephone service, might be the
service where you'd plug in your computer. And if you were in
the Far East you'd be using the Captain system.
So far we've generalized the generic. We have a user, a
computer, and a communications system. Specifically, how
does all this mix? With technology.
The technology is helping to provide flexible, reliable,
and cost effective data communications. And CompuServe is
just one videotex service which accomplishes this.
CompuServe has been serving some of the nation's
largest industries in major metropolitan areas through coast-
to-coast sales and service facilities since 1 969. By the late
1970s, CompuServe had an established reputation for relia-
bility in providing software solutions, operations assistance,
and research and development capabilities to its business
customers. Having successfully introduced electronic infor-
mation services to the business world, CompuServe then
turned their efforts toward personal computer services and
opened up a world of information to the hobbyist, the profes-
sional, and the novice.
So, what are the topics that an out-of-town business-
person would be interested in once settled into a hotel
room?
Well for the business maven, CompuServe has several
services to whet the appetite.
For the business traveler who likes to keep up with the
news, CompuServe offers The Washington Post, The AP
Wire, The Business Wire, The Business Information Wire and
Tickerscreen which will keep you busy catching up on busi-
ness you missed while you were engaged in . . . business.
The Washington Post provides summaries of the busi-
ness and governmental fields and calendars of congres-
sional activities. There are also administrative features,
congressional news, articles on business and economy, sci-
ence and technology, the courts and the law, the world and
the nation, editorials and commentaries, and politics.
Many sections include news digests which give brief
descriptions of recent happenings, decisions and conflicts.
TRS-80 Microcomputer News, November 1983
33
From The Washington Post you can connect directly into
the Associated Press Viewdata Wire. The Viewdata Wire is
formatted especially for videotex screens. The Viewdata Wire
offers world, national, political, historical, Wall Street, and
other types of information in an up-to-the-minute format. The
entertainment section looks at news from the theater, the
soap operas, television, movies, and other selected features.
You can find out if it's raining where your next meeting is
being held, or if anything major has happened in business
while you were out of the office.
And when you're done catching up on the day's busi-
ness news, you can read up on what's happening with the
rest of the world. The Associated Press Viewdata Wire will
provide you with some of the most informative and interesting
human interest stories. And you can be sure they're the latest
news as the AP Wire is updated constantly.
The Business Wire also makes available business news
of the day in the form of press releases, news articles and
feature articles. When you've read all the other reports, the
Business Wire can provide you with information on hundreds
of different companies daily. Also, the Canadian Business
Wire can provide you with the up-to-the-minute news and
information it has been providing to government leaders and
Canadian businessmen since 1975. Access the Canadian
Business Wire and read about the news from around the
Great White North, or from around the world.
After you've settled in, freshened up and read the daily
news, it's time for dinner. But what about the weather, and
your dinner companion, who might be a particular person.
Solution. Once again, access CompuServe and type GO
WEA first of all. WEA stands for weather, which will tell you if
you should bring an umbrella, change into lighter dress or
bundle up for a particularly cool evening. You can even find
out what the extended forecast will be for the area you're in,
your next destination or homestead.
Back to the dinner company. If you know that your
companion(s) have a taste for good wine, try CompuServe's
Bacchus Wine Data.
Bacchus Wine Data can provide you with useful informa-
tion whether you're a connoisseur or a neophyte. Bacchus
can help you pinpoint what type of wine to have with your
companion. The Wine Information section can help you fig-
ure out what wine to order with your dinner, tell you character-
istics of wines (in case he/she orders the wine; you'll know
what you're drinking) and also gives you a section on the
special vocabulary of wine.
Wine Recommendations will tip you off about good
wines at great prices and great wines at any price. It also
includes a section of wines that have just been released. You
can really make a nice impression if you pick a great wine at a
great price, can tell a little about it, and know the correct name
and its characteristics.
As you're getting ready to go to dinner and have a little
extra time on your hands, take care of a couple of things.
Send EMAIL (electronic mail) to your office to let them know
how you're doing. EMAIL allows you to communicate with
other users by using their User ID as a mailbox address. Tell
them how you're doing, what you've left to do, and then send
it to them— within a half-hour. They'll be glad you did.
And, if you may be picking up the tab for dinner, keep a
check on your expenses using our Electronic Banking ser-
vice. If you're a member of one of the banks listed on our
service, you can check the balance on your checking ac-
count, savings account or other personal or business ac-
counts with the touch of a keyboard. You can even pay an
overdue bill through your computer before you leave for
dinner.
When dinner is over and you've some time before turn-
ing in, you can do a little hopping around on the system.
Prepare for your pet project by doing some research with
Information On Demand. Whatever you need, they'll provide.
Information On Demand has access to various other informa-
tion data banks as well as its own. This is a premium service,
however, and there will be an extra cost for the labor con-
nected with all searches.
You can also enlist the services of Grolier's Academic
American Encyclopedia. Grolier's provides a 21 -volume,
nine-million word searchable database of subjects for you to
pick from. Whether it be France or Siam, Grolier's can give
you a brief, yet concise description to suit your needs.
For some relaxation after dinner, don't turn on the TV,
switch to the games section of CompuServe. They have over
45 games and entertainment features for you to choose from.
Play MegaWars or MegaWars II, The Fourth Dimension. Be a
Kryon or a colonist and champion the cause for the freedom
of the Empire.
Play Blackjack against the computer or against another
person, perhaps from across the country. Maybe even some-
one from your home town. Maybe even your spouse.
Play word games, board games, puzzles or simulations.
When you've tired yourself out from fighting dragons,
space warriors, hangmen and dwarves, you can do one last
thing before you watch the Carson monologue and then
retire.
You can use the Official Airline Guide (OAG) to check
your flight schedule. OAG provides listings of flight schedules
and fares. Just follow the input prompts under the OAG
service to know when you're coming and going.
Now that that's accomplished you can get a good night's
rest. And in the morning before your flight leaves or your next
meeting, you can check the Peak Delay Guide,
CompuServe's Aviation service which lets you know if the
major hub from which you're leaving, or to which you're
arriving, will be clear, fogged in or keeping planes in a holding
pattern over the city for any unlimited amount of time. The
Peak Delay Guide works wonders for those busy people not
wishing to get caught up in the jet stream of things.
Make your next business trip a success by taking
CompuServe along. CompuServe's just a phone call away.
Questions and comments about the CompuServe Infor-
mation Service can be sent to Richard A. Baker, Editorial
Director, or Jacqueline A. Farthing, Assistant Editor,
CompuServe Information Service, 5000 Arlington Centre
Boulevard, P. 0. Box 20212, Columbus, Ohio 43220 or
through Feedback, main menu item 5, CompuServe User
Information. JEl
34
TRS-80 Microcomputer News, November 1983
Mode! 4
The Model 4P Portab
By Linda Miller
Wouldn't it be nice to have a portable computer com-
plete with disk drives, a nice readable screen, a full range of
existing software, and yet not have to lug around something
that dislocates your shoulder every time you pick it up? The
TRS-80 Model 4P (Cat. no. 26-1080, suggested retail price
$1 ,799) is such a computer. As its name implies, the 4P is a
portable Model 4.
WHAT ABOUT SOFTWARE?
The Model 4P will run Model III disk software as well as
software designed for the Model 4. A Model III emulation
disk comes with the 4 P. When the 4P is booted with the
emulation disk, an image of the Model III ROMs is loaded into
the lower 14K of memory and that area of memory is write
protected. The 4P then operates as a Model III, except that it
does not have cassette input/output.
5 1 /4" Thinline Drives
Brightness Contrast
Power 9 " Screen
Special
Function
Keys
Ceyboard
Storage Space
Standard
Typewriter
Keyboard
Height
Adjustment
Levers
Numeric
Keypad
THE MODEL 4P DIFFERENCES
The Model 4P is packaged in an attractive off-white
case. The primary differences between the Model 4 and the
Model 4P are cosmetic.
The Model 4P has:
Two 5 1 /4'; thinline double density floppy disk drives. Two
is the maximum number of floppy disk drives available
for this unit.
A 9" screen compared to the 1 2" screen of the Model 4
No cassette port or Model III ROMs
An optional Model 4P Modem on a user installable card
(Cat. no. 26-1084)
On the back of the 4P is a recessed handle which lifts out
for ease of carrying and snaps back into place when the
computer is not being toted about. When it's time to transport
the 4P, the keyboard is slipped into the keyboard storage
space under the console display, diskettes can be conve-
niently stored in the cover, and the cover is snapped securely
to the console via the side latches.
The 9" black and white, high resolution monitor has a
highly readable eighty column by twenty-four line display.
When in the Model III mode, you have 64 columns by 16
lines.
The Model 4P keyboard height is adjustable. With the
levers at the rear of the keyboard pressed in, the keyboard
lies flat for ease of storage. With the levers pulled out, the back
of the keyboard is slightly elevated so that it tilts toward the
operator at a slight angle.
Notice also the two thinline 5 1 /4'( disk drives to the right of
the display.
PORTABLE AND COMPACT
The Model 4P tips the scale at about twenty-six pounds
and goes together to form a compact, easily transportable
unit. The 4P is a "real" Model 4 computer which just happens
to have the added feature of being highly portable.
TRS-80 Microcomputer News, November 1983
35
1
A PORTABLE MODEL 4
The Model 4P has many of the same powerful features
as the Model 4 including:
64K RAM— expandable to 128K
Z-80A microprocessor
Three special function keys
Caps key
Key Click
A version of TRSDOS which is datafile compatible with
LDOS 5.1.3
Optional use of the CP/M operating system with no
additional hardware card installation needed (not yet
available)
TRSDOS 6.0 which is the same powerful operating sys-
tem the Model 4 uses. TRSDOS 6.0 features include a
print spooler, a communications program, and job con-
trol language (JCL).
Parallel printer interface
RS232C interface
An 80 column by 24 line display with upper and lower
case in the Model 4 mode and a 64 column by 16 line
display under TRSDOS 1.3 or LDOS 5.1.3 in the
Model III mode
Reverse video
Sound— One voice, seven tones
Microsoft BASIC
MEMDISK, a feature which simulates a disk drive in
available memory either within the standard 64K or us-
ing the additional 64K bank of memory.
AND SO . . .
The TRS-80 Model 4P is an attractive, powerful machine
which already can run thousands of available programs. It is
a full fledged Model 4 computer that just happens to be
portable. J3
Writing Postcards/Labels
Via the Model 11/12
Ron Kuris
8822 Sheldon West Drive
Tampa, FL 33624
If you own a Model II or 1 2 with a printer, this may be one
of the handiest tricks around.
I recently had a problem with typing a single postcard or
label on my hard disk system. In order to do so, I had to exit
my current program, load SCRIPSIT-HD, create a document,
type the card, print the card, and then go back to program-
ming. Now, I have an easier way.
I return to TRSDOS Ready, type dDLQDCBDCoD, and
press (enter ). Then, I hold down (CTRL) and press QD.
Lo and behold, all further keystrokes are sent to the printer.
So, I type my postcard (being careful not to make mistakes),
then hold (ctrl) again and press C2D- I then press
(break) which returns me to TRSDOS Ready, and re-start
my application program. This saves me about two or three
minutes of moving through SCRIPSIT trying to type a simple
postcard. Now, I truly can throw away my typewriter.
Also note, if you have a Model 1 2 or a new Model 1 6, you
can press (F7) instead of holding (CTRL) and pressing QD
since they have the same ASCII value.
I also use this procedure to change modes on my printer.
You can send any control code to your printer in this mode (as
well as the video). J3
Minimum Scripsit 2.0
Diskettes
George R. Berman
84 Franklin Avenue
Yonkers, NY 10705
When you select the format utility in SCRIPSIT 2.0, you
find that the last question on the menu is "Will this diskette be
used in drive (Y or N)?" The default response is "N."
Nevertheless, I suspect that most users change that to "Y"
and thus carry the entire TRSDOS and SCRIPSIT systems on
every diskette. Consider the alternative.
If you select the default response, SCRIPSIT will format a
diskette which has nothing on it except your documents in a
large file called DOCUMENT/CTL. The directory on such a
diskette has nearly twice the capacity of a full-system diskette.
Not only does this save on diskette purchases, but it means
fewer diskettes to search for a document.
A problem arises when you try to back up such a "mini-
mum" diskette because SCRIPSIT requires a system diskette
in Drive to complete the backup process. Thus, unless you
have three drives you cannot backup a "minimum" diskette
within SCRIPSIT. The solution lies in TRSDOS. With the "mini-
mum" diskette in Drive 1 and a SCRIPSIT system diskette in
Drive 0, exit to TRSDOS. Type "BACKUP 1 TO 0". When
TRSDOS asks if the destination diskette is ready, put your
backup diskette in Drive and answer "Y". The backup will
run to completion and then ask you to return a system disk-
ette to Drive 0. All done with one diskette swap. J3
TRS-80 Microcomputer News, November 1983
Business Graphics Analysis Pak
Added SuDDort. New Features
lT w ' *9
Business Graphics Analysis Pak, which makes it easy to
obtain a variety of business charts, has been significantly
enhanced by its developers at TimeWare Corporation.
Originally designed for the Model III TRS-80 microcom-
puter and announced in the December 1 982 issue of TRS-80 ,
Microcomputer News, Business Graphics has been up-
graded for use with Model II and high-resolution devices.
The new Model II version of Business Graphics requires
at least one disk drive and 64K RAM and includes such
added capabilities as pie charts with detached slices and
scatter charts based on up to three sets of data. The Model II
version can also be used with the Model 1 2 or the Model 1 6 in
II mode.
The upgraded Model III version of Business Graphics
requires two disk drives and 48K RAM and can also be used
with Model 4 in Model III mode.
Both versions offer high-resolution for both screen dis-
plays and printed output.
Line Charts
ADVANTAGES OF HIGH RESOLUTION
How do high-resolution graphics differ?
• Charts are more precise, as the data points can be
placed more accurately.
• Curved lines are smoother.
• More shading types are available, and all shading is
finer grained.
• Because fine outlines are used, very small bar seg-
ments and pie slices— often hidden in low-resolution
charts— can be clearly defined.
In short, high-resolution means more accurate and more
attractive charts!
HIGH-RESOLUTION GRAPHICS BOARD
If your TRS-80 microcomputer has the high-resolution
graphics board, you can obtain screen displays that match
the high-resolution printed output.
Large charts that overflow the low-resolution screen can
be viewed in their entirety in high-resolution, as the display is
reduced to fit the viewing area.
Bar Charts
OUTPUT DEVICES SUPPORTED
You can obtain printed copies of your Business Graphics
charts with any of the following Radio Shack printers:
• Dot Matrix printers DMP 100, 200, 400, 500, and
2100
• Line Printers V, VI, VII, and VIII
• Daisy Wheel II and DWP 410 printers
All the charts illustrated in this article were produced on a
DMP 500 printer.
If you have the Multi-Pen Plotter, you can produce charts
in up to six colors, drawing the charts either on paper or
directly on transparency film for use with an overhead
projector.
HOW BUSINESS GRAPHICS CHARTS ARE CREATED
To create a chart with Business Graphics, all you need to
do is select the chart type and supply your data. Your chart is
set up automatically— scaled, labeled, and laid out to suit the
printer or plotter you are using.
TRS-80 Microcomputer News, November 1983
37
Pie Charts
If you prefer to control the format, menu selections make
it easy to insert titles, request automatic time labels, change
the size or scale of the chart, and add a frame.
While your chart is displayed on the screen, you can edit
the text— inserting, changing, or deleting characters. You
can use the arrow keys to move text around on the screen,
placing the text wherever you want it, in or about the chart.
When satisfied with the results, you can produce a hard copy
of the chart on your printer Or plotter.
Charts and chart settings can be saved for future use.
You can use the same settings with different data to produce
a series of related charts, or for quick output of charts used for
periodic reporting.
Scatter Charts
CHART DATA
Data for your Business Graphics charts can be entered
at the terminal, brought in from a disk file, or generated by the
program. Virtually any type of file— VisiCalc, SCRIPSIT,
BASIC, FORTRAN— can be used. (Some file types require
conversion with a utility supplied with the package.)
You can edit data— adding, deleting, or changing val-
ues. You can transform data with various built-in functions-
consolidating data, smoothing out fluctuations with a moving
average, computing a trend. and projecting it into the future,
and then use that transformed data to produce more mean-
ingful charts.
CHARTS TYPES
Four types of charts are available:
• Line charts emphasize trends over a period of time.
Charts may obtain up to three curves, each based
on up to 100 points.
• Bar charts pinpoint individual values and are effec-
tive for comparisons. Charts may contain up to 100
bars, and the bars can be stacked with up to three
segments or clustered in groups of up to three bars.
• Pie charts compare parts to a whole and may con-
tain up to 12 slices. With Model II, individual slices
can be detached from the center of the pie.
• Scatter charts can be used to show relationships
between data, to plot data with different time inter-
vals, to lead or lag curves, even to create designs or
logos. With Model II, charts can be based on up to
three sets of data, each comprising up to 1 00 pairs of
values.
Chart width can range from 2 to 1 1 inches, and chart
height from 3 1 /3 to 11 inches. Any chart can be framed.
Solid, dashed, or dotted lines can be used for curves,
and any character can be specified for the data points.
Curves, bars, bar segments, and pie slices can be shaded.
If you have the Multi-Pen Plotter, you can specify the
color to be used for the curves, data points, bar or slice
outlines, shading, and text.
WHY USE GRAPHICS?
Communications professionals use charts to convey nu-
meric information quickly and clearly. Charts show what the
numbers mean and make the information easier to
remember. J&
38
TRS-80 Microcomputer News, November 1983
The Assembly Is Getting O
Hand, Call the Supervisor
Jean-Pierre Radley
320 Central Park West
New York, NY 10025
"Si non e vero, e ben' trovato" . . . Italian proverb
My first computer was the Radio Shack hand-held PC-1 . I
learned BASIC on it by brute force. Three months later(!) I
decided I was ready for the Model II. Opening its Manual was
a bit short of devastating, but I forged ahead on my own in the
wee hours. I was soon into Supervisor Calls and assembly
language. I had two guides, Barden's TRS-80 Assembly
Language Programming (RS #62-2006) and Rosenfelder's
BASIC Faster and Better (RS #62-1002).
Think of an SVC as a subroutine which finds its marching
orders in the low part of RAM where TRSDOS lives. Even the
BASIC interpreter does not contain every last byte needed for
one of its commands; a lot of its work is done by SVC's.
To start playing with SVC's, you need to read the DEBUG
section of your Manual; you need an even dozen of Z-80
instructions; you need to be patient, careful, and accurate.
Even without any Z-80 reference works, you could crib the
necessary codes from the sample programs given in the
Owner's Manual. The essential dozen is in Fig. 1 .
MNEMONIC
LD A,n
LD B,n
LDC.n
LD D,n
LD E,n
LD H,n
LD L,n
RST8
RET
LD BC.ij
LD DE.ij
LD HL,ij
CODE
3b
n
06
n
0E
n
16
n
1E
n
26
n
2E
n
CF
C9
01
ji
11
ji
21
ii
RESULTS
load register A with n
load register B with n
load register C with n
load register D with n
load register E with n
load register H with n
load register L with n
jump to execute the SVC
return to where you came from
load registers B & C with ij
load registers D & E with ij
load registers H & L with ij
Figure 1.
In the case of the last three, you must write code in the
LSB/MSB format used by the Z-80, and you must always
write values in hexadecimal (when hand-assembling code,
that is; assembler programs accept values in any base, and
addresses in "normal" MSB/LSB). If you need to load B with
66 and C with 60, first "hex" those values: 66D = 42H, 60D
= 3CH. Then your four bytes of code are: 06 42 0E 3C, using
the second and third instructions in Fig. 1 . You can do the
same thing in three bytes with the antepenultimate instruc-
tion: 01 3C 42 .
From TR SDOS READY, type CE)mmCu)CG)mCo)CN)
CENTETn, then CEXECEXuXgD (enter) . Type CM),
then some two-byte hex values, and use the up- and- down
arrows. You can't get below 2800H, nor beyond F3FFH. The
lower part is for TRSDOS itself, and the upper is for routines
like DEBUG, DO, or SPOOL. The area between F000H and
F3FFH is locked out to BASIC or VisiCalc or any other pro-
gram. However, we can use it for short assembly language
programs which will not be disturbed by loading other pro-
grams. If you wanted to put these exercises at E000H, and
you were also using BASIC, then you would enter BASIC with
-M:57344. To exit DEBUG, type (esc) and either CUD or Q3D.
m returns to TRSDOS with DEBUG still on while Co) turns
DEBUG off before returning to TRSDOS.
(Editor's note: the 4.x series of Model 11/12/16 TRSDOS
operating systems reserve the right to use all memory above
F000H. If user machine language routines are written so that
no portion of them exceeds F000H, then there is no chance
of them being overwritten by TRSDOS. Remember, however,
to protect the routine from being overwritten by a BASIC or
COBOL program)
VDLINE
Let's start with SVC#9 which is called VDLINE. The Manual
says, "This routine writes a buffer of data to the Display,
starting at the current cursor pos ition . . ." If DEBUG is
on, type mmmmmCOTimmmcmcmCo).
If DEBUG is not on, type (BmmCQDCG)mCo)CH)
(enter). Hit the Cf_JJ k ey; if the cursor's not in the upper
left corner, try CHS CM) CED. We're going to
"hand-assemble" a little buffer of data. Use (tab) or the four
arrow keys to high-light position F040H. Consult Fig. 2. Type
cmcm mm mm mm cmm cscs mm mm
mm mm mm mm mm mm mm. now
get the cursor to F000H (just hit CODCMXEXoDCqD
cmczm).
The Manual says that A must have the SVC's number, B the
number of characters to be sent to Display, C an optional end-
of-line character, and (HL)— the parentheses means HL has
the address, or "points to"— must be the location of the buffer
of data. So we need to issue these orders:
Load A with 09D = 09H SVC VDLINE
Load B with 15D = 0FH length of the message
Load C with 13D = 0DH code for carriage-return
Load HL with F040H where the buffer starts.
From Fig.1 we find our four instructions to be:
mm mm mm mm mm mm mm
mm mm (40 F0 is in LSB/MSB order!)
Type them starting at F000H (without the extra spacing that
I've put in between the four groups). Two more instructions:
mm invokes the SVC instructions that were just entered,
and GDID which will return to the address saved in the stack
(look at SP on the video,) or else the CPU will hunt past the
end of this program and find some code to execute which
may or may not be to our liking.
TRS-80 Microcomputer News, November 1983
39
TRS-80 Model II DEBUG Program
F000 3E 09 06 OF OE OD 21 40 FO CF
F010 FF 00 FF 00 FF 00 FF 00 FF 00
F020 FF 00 FF 00 FF 00 FF 00 FF 00
F030 FF 00 FF 00 FF 00 FF 00 FF 00
F040 09 1A 20 41 4C 4C 20 41 42 4F
F050 FF 00 FF 00 FF 00 FF 00 FF 00
F060 FF 00 FF 00 FF 00 FF 00 FF 00
F070 FF 00 FF 00 FF 00 FF 00 FF 00
PC SP SZHPNC AF BC DE HL
FOOOO 21 FE 000000 0000 0000 0000 0000
?0
DEBUG is now OFF
TRSDOS READY
Figure 2.
NOW, (using Fig.2) CHECK ALL THE ENTRIES VERY
CAREFULLY! Weird things in the middle of the night will grab
you, if you made a mistake. Press ( f 2 ) to leave DEBUG's
edit mode. Type QD; type (EGDGDGD. Now PC, the pro-
gram counter should read "F000," the next address the CPU
is to go to for an order. Is the diskette backed up? Light up,
drink up, or stand up. Let's continue: type QB- Hey!
Terrific the first time you do it yourself, but hardly of major
usefulness. The point is, though, that every SVC can be
performed using the simple Z-80 commands given here in
Figure 1: LOAD A, B, C, D, E, F, H, or L with the values
required under the description of the SVC, RST 8, and RET.
PRINIT, PRCHAR, AND PRLINE
Now we'll do something more practical which I cooked up
because my VisiCalc printouts were requiring too much
cutting and pasting of large sheets. O riginally I had VisiCalc
issue a set-up string to my LP-V: (esc) (ctrl) CbD
translates to IB 0E, the CONdensed STaRt code. Fine, the
printer would now be in condensed mode, but TRSDOS
would still issue carriage returns after 132 characters on a
line; now I'd type /SE (Execute System command) FORMS
[W = 1 98] to fill up the entire width of my paper. Here's where
elementary hand-assembly in the DEBUG did the job faster.
We're going to use three SVC's:
#17 PRINIT the SVC underlying FORMS [P= L= W = ]
#18 PRCHAR send one character to the printer
#19 PRLINE send a line of characters to the printer
For a new VisiCalc printout, we want PRCHAR first to issue
a top-of-page command from wherever the printer now is on
the page. The other two SVC's need to be used together.
PRLINE gives instructions to the printer about type size;
PRINIT gives matching instructions to TRSDOS'
TRS-80 Model II DEBUG Program
F000 1B 0E IB 36 3E 12 06 0C CF 3E
F010 CF 3E 11 01 3C 42 16 C6 CF C9
F020 FF 00 FF 00 FF 00 FF 00 FF 00
F030 FF 00 FF 00 FF 00 FF 00 FF 00
F040 FF 00 FF 00 FF 00 FF 00 FF 00
F050 FF 00 FF 00 FF 00 FF 00 FF 00
F060 FF 00 FF 00 FF 00 FF 00 FF 00
F070 FF 00 FF 00 FF 00 FF 00 FF 00
PC SP SZHPNC AF BC DE HL
2800 21 FE 000000 0000 0000 0000 0000
?0
DEBUG is now OFF
TRSDOS READY
DUMP CONSRR6 START = F000 END = F019 TRA = F004
Figure 3.
C9 00 FF 00
FF 00 FF 00
00
00
FF
FF
41
FF 00
FF 00
FF 00
IX
0000
FF 00
FF 00
20
00
00
52 44
FF
FF
FF
IY
0000
FF 00 > !@
FF 00 %
FF 00 '
FF 00
19 00 . . ALL ABOARD . .
FF 00
FF 00
00 FF 00
AF' BC DE' HL'
0000 0000 0000 0000
bookkeeping. Open your Manual to these SVC's, and we'll
put the printer in condensed mode with this data: (also check
your printer manual to see if it uses the same control codes as
Line Printer V).
CON STR "1 B 0E" starts condensed mode on LP-V
i/e"L "1B 36" 6 lines/inch (normal) on LP-V
Page length = 66D = 42H
Lines printed = 60D = 3CH
Max chars/line = 198D = C6H
Top of page = 12D= 0CH
SVC PRINIT = 17D= 11H
SVC PRCHAR = 18D= 12H
SVC PRUNE = 19D= 13H
At F000H, type the message
for the printer:
AtF004H, load A
with 18D
At F006H, load B
with top-code:
At F008H, do PRCHAR, send 0CH
to the printer:
At F009H, load A with 19D:
AtFOOBH, load B with the
length of the message:
We do not load C with anything as we don't need any other
character after the four byte buffer.
At F00DH, load HL with the
message address:
(remember LSB/MSB).
AtF010H, do PRTLINE, send
message to the printer:
1B0E 1B36
3E 12 'PRCHAR
06 0C
CF
3E 13 'PRUNE
06 04
21 00 F0
CF
13 06 04 21 00 F0 . . . 6>. . . . >. .
FF 00 FF 00 FF 00 . >. . B
FF 00 FF 00 FF 00
FF 00 FF 00 FF 00
FF 00 FF 00 FF 00
FF 00 FF 00 FF 00
FF 00 FF 00 FF 00
FF 00 FF 00 FF 00
IX IY AF' BC DE' HL'
0000 0000 0000 0000 0000 0000
y
40
TRS-80 Microcomputer News, November 1983
TRS-80 Model II DEBUG Program
F000 1B OE 1B 36 3E 12 06 OC CF 3E
F010 CF 3E 11 01 3C 42 16 C6 CF C9
F020 1B OE 1B 38 3E 12 06 OC CF 3E
F030 CF 3E 11 01 50 58 16 C6 CF C9
F040 1B OF 1B 36 3E 12 06 OC CF 3E
F050 CF 3E 11 01 3C 42 16 C6 CF C9
F060 FF 00 FF 00 FF 00 FF 00 FF 00
F070 FF 00 FF 00 FF 00 FF 00 FF 00
PC SZHPNC AF BC DE HL
2800 21 FE 000000 0000 0000 0000 0000
?0
DEBUG is now OFF
TRSDOS READY
DUMP C0NSTR8 START=F020 END = F039 TRA = F024
TRSDOS READY
DUMP CONEND START = F040 END = F059 TRA = F044
Figure 4.
13
FF
13
FF
13
FF
FF
FF
IX
0000
06
00
06
00
06
00
00
00
04
FF
04
FF
04
FF
FF
FF
IY
0000
21
00
21
00
21
00
00
00
00
FF
20
FF
40
FF
FF
FF
AF'
0000
FO ... 6> ....>... !
00 . > . . B
FO ... 8> ....>... !
00 . > . . PX
FO . . . 6> >...!<£
00 . > . . B
00
00
BV'DE' HL'
0000 0000 0000
3E 11 'PRINIT
01 3C 42
16 C6
CF
C9
Now we need to initialize TRSDOS printer driver. You
should be at F011H. Proceed:
At F011H, load A with 17D:
At F013H, B and C get the
66D and 60D values (in the
usual LSB/MSB pattern):
AtF016H, get the 198D into D:
At F018H, RST8:
AtF019H, finally, a RETURN
statement:
You should have written bytes from F000H to F019H inclu-
sively. CHECK YOUR CODE against Figure 3 before fixing it
in RAM with the F2 key.
While the first four bytes are codes that we want to send to
the printer, we have no idea what kind of instructions they
represent for the Z-80 or what mischief they might cause if we
tried to execute them as Z-80 code. Program execution starts
at the fifth byte. Type COD CD, answer the prompt
ODCDGDGD. Type C© to continue the CPU's work at loca-
tion F004H. If the printer was off, nothing much will happen
since we haven't provided any error-reporting commands to
act on those Z and NZ exit conditions described under each
SVC. If the printer was on, it should have moved to a fresh
page and be in condensed mode.
Let's do it again in slow motion. Go back to DEBUG at
location F000H. ESC cancels the M prompt. Type QO, then
CD, then CECSCSDClDClDCIDCDCoDCDCoDClDCIDCEDCoD
CIDCECBCTXOSaXID. DEBUG will break execution at
each D7 it has substituted for a CF or C9, until you type C
again. Again J(ump) to F004H. Type QD four times, slowly,
and watch the register contents change on the screen. With-
out the breakpoints— type CB(mpty)— the Z-80 proceeds at
its 4 MHz clock rate.
You don't imagine that we're going to do a J and a C in
DEBUG each time we want to get small printing? Get the
code on the screen again, type (esc) and SD which will
turn off DEBUG and return you to TRSDOS. Now, turn to the
DUMP instructions. We need a filespec to store our routine,
say CONSTR6. The syntax is: DUMP CONSTR6
[START = F000 END = F019 TRA = F004], It costs an entire
granule of disk space, but it's awfully fast. In VisiCalc, to
get small prin ting you now type QDCIDCID LQDCQDCnD
CSXlDCBDdD (enter) . The command in BASIC is:
CsDmCsDCTJCECMDCZDCSCSCNDC^CTDCECIDCID.
Our next objective is to compress printing not just horizon-
tally, but also vertically. If the code isn't still at F000H, there's
a quick way to get it there. If DEBUG is ON, any program
name typed from TRSDOS READY will take you into
DEBUG and wait at its TRAnsfer address. So type
(ECEXBXUDCGDCODCHD, then CECoDCNDCSmCRDCeD.
Type CSDCDCqDCqDCqD (esc) . Most of the new code will be
identical, so we'll copy it by typing CD- Answer the start, end,
and transfer prompts with F000, F019, and F020. Type CMD,
Cm . Change the following bytes:
At F023H 36 -> 38 (for 8 lines per inch)
At F02EH 00 -> 20 (LSB of the message address)
At F034H 3C 42 -> 50 58 (print 80 lines out of 88)
This program gets DUMPed as CONSTR8 (CBCUDCMXpD
OCECoOTCsDmCECSOCsDmCECEroQCFDCoD
C2DCBCD(BCNDCEC3CECSCSCDCDCTDCRDCADrX)CFD
CEdDCS).
You can see in Figure 4, from F040H to F059H, another
routine which cancels either of the first two: CONEND.
If you want to use these routines from BASIC, there's no
need to do a disk access each time. These little programs
have non-overlapping RAM addresses, so you can load each
of them only once with three commands of the form
SYSTEM "filespec." Now that these cuties are sitting there
from F000H upwards what's the equivalent in BASIC to the
J(ump) and C(ontinue) commands used in DEBUG?
USR0 to USR9 are fixed two-byte locations in BASIC'S area
of RAM (from 2B2AH to 2B3DH). The DEFUSRn command
loads USRn with an address. It says, "Here's an address."
The statement J% = USRn() is really a GOSUB to an opera-
tion external to your BASIC program. It says, "continue at the
address stored in USRn," (e.g. to execute CONEND with
USR # 8: J% = 0: DEFUSR8 = &HF044: Jo/ = USR8(0)). It's a
pretty fast way of getting a fresh page with different print
sizes.
You could DUMP all three routines into ONE file, say
CHGPRINT, START = F000H, END = F059H, specifying
no TRAnsfer address, but putting RORT = R into your
DUMP parameters so that the file would load, not execute,
and then return. Then DEFine the USeR addresses as the
respective points where each little program is meant to start
and where it will run until the C9 instruction returns to your
BASIC program. So, to get condensed print, 8 lines to the
inch, pick any USR number, say 5. DEFUSR5 = &HF-
024: J = USR5(0). (The zero is a dummy parameter in this
case. You can reDEFine USR # 5 over and over, or use a
different number for each routine.) For still more flexibility, if
you don't want a Top-of-page, start after the PRCHAR seg-
ment. For CONEND (normal printing) without starting a fresh
page: DEFUSRn = &HF049. Enjoy! J2
TRS-80 Microcomputer News, November 1983
41
Musical Notes
by Bryan Eggers
Software Affair, Ltd.
"I can't believe that your computer is really making that
music! You must have a tape recorder hidden under the
table."
No, we don't have a phonograph up our sleeve, either.
It's Radio Shack's new STEREO music synthesizer,
Orchestra-90™ (26-1922), in its Special Composer's Edition.
Anyone with a TRS-80 Model III or 4, Level I1 1 6K tape
or disk system can create amazing music and percussion in
up to FIVE simultaneous notes ("voices") in STEREO! Each
voice may be assigned any of five different instrument
sounds: organ, oboe, clarinet, trumpet or violin. In addition,
each of these instrument registers may be modified to
produce new user-defined sounds.
Orchestra-90 allows transcription and synthesis of any
written sheet music, even if the user has NO MUSICAL
KNOWLEDGE whatsoever! The powerful music language
allows professional musicians to utilize the system, too. In
fact, Orchestra-90 has been used in education, live stage
performances, and radio commercials. It was recently used
to synthesize all the music for an album by a contemporary
composer, Robb Murray. He used Orchestra-90 to compose
and play every song!
The system consists of a small interface box containing
two precision digital-to-analog converters that convert the
digital output of the computer into stereo audio signals. The
interface plugs into the 50-pin connector on the bottom of the
computer.
No internal modifications are required to the computer,
no additional power supply is required, and the interface has
no effect on normal operations of the computer. Two phono
jacks on the box supply the stereo music output. These are
connected to the TAPE, TUNER, or AUXILIARY inputs of any
stereo amplifier or receiver using standard phono cables
(available ,at Radio Shack).
The heart of the Orchestra-90 system is a single software
program. This software functions as a full-screen text editor,
compiler, and digital synthesizer. This allows complete input,
modification, compilation, and play of music without leaving
the master program, which uses less than 8K of memory. The
balance of memory is available for creating your music file.
Orchestra-90 files are extremely compact, using about 1 K of
memory per minute of playing time. Files may be saved to
tape or disk for future play or modification. Four sample
music files are included with the system.
Music files can also be transmitted via modem to your
friends. An additional source of music files and information is
the free Orchestra-90 Special Interest Group on the
CompuServe Information Service. Support for the Orchestra-
90 is provided by Software Affair, Ltd., the designers of
Orchestra-90. After logging into CompuServe, type "GO
HOM-5". A menu gives you two choices: the Orchestra-90
ARCHIVES area or the Orchestra-90 SIG area.
The ARCHIVES is a permanent storage area for Orches-
tra-90 information. The Orchestra-90 SIG contains the mes-
sage center for users, as well as databases containing over
300 music files plus many utility programs, including a FREE
smart terminal program, ORCTERM! You can use this pro-
gram or VIDTEX to download music files from the XA2 data-
base. The uploading and downloading procedures are
explained in the Orchestra-90 manual.
TRANSCRIBING MUSIC
You don't "play" the keyboard to produce music with
Orchestra-90. You teach your computer how to play any
piece of sheet music!
You do this by creating a text file that represents your
sheet music in Orchestra-90's symbolic code. This file will
then be interpreted by the system's internal music language
compiler. Once compiled (in only a couple of seconds), the
piece can be played. An additional compile command allows
you to play from any cursor location in the music file. You can
listen to each measure as you enter it, or the last couple of
measures, etc. This transcription system is faster than any
other music system available for any computer. Proof of this is
an estimated 10,000 Orchestra-90 music files already in cir-
culation! One user we know, Jim Sheldon, has already ar-
ranged over 800 songs!
Transcribing music is very easy. Each note requires only
two pieces of information to be properly transcribed in
Orchestra-90 notation. You need to input the duration (length)
of the note and its position (pitch) on the musical staff. If you
aren't familiar with standard music notation you simply com-
pare each note on your sheet music to a reference chart in the
manual, then insert the equivalent Orchestra-90 music lan-
guage symbols into your music file. The compiler indicates
the location and type of any syntax errors found in the file.
Adults and children can learn to use this system very quickly.
Orchestra-90 can be used to transcribe music written in
any key or time signature. The synthesizer can play whole
notes through sixty-fourth notes, with a range of over six
octaves. Notes may be single, double or triple-dotted and/or
played as triplets. Accidentals are also supported, as are
repeats, multiple endings, and modulations.
The tempo of the music can be defined and changed
anywhere in the music file. You can even experimentally
determine a new tempo setting while the music is playing by
pressing special key combinations. Then, you can edit the
new value permanently into your music file.
Sections of the music file can be repeated at different
tempos and/or with different voice/instrument assignments
without retyping any of the repeated section.
42
TRS-80 Microcomputer News, November 1983
4_ ^ybtmBtdmmmmanmmmmmmmmm
Orchestra-90
Music Language Scale
The manual explains how to transcribe any piece of
sheet music. Examples are given and described in detail.
This kind of direct transcription of sheet music requires no
musical knowledge, but once you become familiar with mu-
sic notation and the Orchestra-90's capabilities, you'll dis-
cover many interesting ways of enhancing your transcription.
Remember, sheet music is normally written for humans to
play, but ORCH can play faster and more complicated ar-
rangements than any human, and it never gets tired or makes
mistakes! You can make some truly dazzling musical ar-
rangements with this system.
The stereo mapping command allows you to determine
which voices play through each of the two stereo channels.
Voices may be switched from speaker-to-speaker at any
point in the music file.
Each of the voices may play using any of the five default
instrument registers. For example, you might have all the
voices playing with the organ sound, or maybe two trumpets,
one oboe and one clarinet, or any combination you like. You
can change these instrument assignments at any point in the
music file. Orchestra-90 is a true digital music synthesizer that
creates all necessary waveform tables in memory. No "sound
chips" are used. Different instrument sounds are produced
by adding multiple harmonics ("partials") to the fundamental
tone. Orchestra-90 allows you to define the relative loudness
of up to eight partials that make up each of the five different
instrument registers. You can also define the relative loud-
ness of each instrument. Each music file can-be saved with its
own special instrument definitions.
If you are a singer or musician, you can set the melody
voice to a loudness of (silent). This allows you to practice
singing or playing the melody while Orchestra-90 accompa-
nies you by playing the rest of the arrangement.
Normally, Orchestra-90 plays consecutive notes as if
they were "tied," in other words, without even a whisper of
silence between them (the musical term is "legato"). But,
each individual note can assigned one of four optional levels
of articulation. Articulation shortens the note and separates it
from the following note, making it more distinct. This simu-
lates the musical effects of "portato" and "staccato."
Not in your key? Orchestra-90 will play the song in any
key you like. It takes only seconds to transpose the arrange-
ment up to two octaves up or down, adjustable in half-step
increments. In addition to this overall song transposition,
Orchestra-90 allows the transposition of each individual voice
up or down in full step increments. For example, you might
feel that the arrangement might sound better if the bass were
played an octave lower. Again, it's just a matter of changing a
couple of symbols in your music file.
Orchestra-90 can also produce percussion effects.
There are two general types of percussion available, sine-
wave and random. Sinewave percussion creates the "hol-
low" percussive effects like drums and wooden blocks, while
random percussion can be used to create "noisy" effects like
cymbals. You can define your own percussion instruments.
Several music files can be played automatically with one
command, just like a jukebox. This is possible with both the
tape and disk versions of Orchestra-90.
A separate utility, ORCHUTIL, is also included. This pro-
gram allows the user to do tape/disk file transfers, remove
unnecessary spaces and measure numbers from music files
to reduce their size, do certain global character changes,
convert files to ASCII for uploading/downloading on BBS
systems, and do 500/1500 baud tape conversions.
In future articles we'll explain specific transcription tech-
niques, arranging tricks, special effects, new instrument defi-
nitions, use of the utility programs, the ORCH-90 SIG on
CompuServe and maybe even a little music theory!
Orchestra-90 is a trademark of Software Affair, Ltd.
TRS-80 Microcomputer News, November 1983 43
Model 100
Model 100 ROM Routines
This is a description of Model 100 ROM routines and
addresses. Although not thoroughly tested, the information is
correct to the best of our knowledge. It is provided for your
convenience.
LCD FUNCTIONS AND ESCAPE CODES
Routines for generating common LCD functions and Escape
Codes. These functions have no entry or exit parameters.
Function
Entry
Equiv
Name
Address
ESC
Description
CRLF
4222H
—
Generate a Carriage
Return and Line Feed.
HOME
422DH
—
Move cursor to Home
position (1,1).
CLS
4231 H
—
Clear Display.
SETSYS
4235H
T
Set system line (lock
LCD line 8).
RSTSYS
423AH
U
Reset system line (un-
lock LCD line 8).
LOCK
423FH
Y
Lock LCD display (no
scrolling).
UNLOCK
4244H
W
Unlock LCD display
(scrolling).
CURSON
4249H
P
Turn on cursor.
CUROFF
424EH
Q
Turn off cursor.
DELLIN
4253H
M
Delete a line on LCD at
current line.
INSLIN
4258H
L
Insert a blank line on
LCD at cursor.
ERAEOL
425DH
K
Erase from cursor to
End Of Line.
ENTREV
4269H
P
Set reverse character
mode.
EXTREV
426EH
q
Turn off reverse char-
acter mode.
LCD VARIABLE AND STATUS LOCATIONS
Name Address Contents
CSRY F639H Cursor Position (ROW).
CSRX F63AH Cursor Position (COLUMN).
BEGLCD FE00H Start of LCD memory.
ENDLCD FF40H End of LCD memory.
DIRECTORY TABLE
DIRTBL F962H
Directory table, contains all file
location, status and type infor-
mation.
Each file in the system is managed by an 1 1 byte directory entry in the
following format:
Byte 1
Bytes 2-3
Bytes 4-1 1
Directory Flag (indicates file type and status).
Address of file
Eight (8) byte filename.
The directory flag contains the following information:
Bit 7 (MSB) 1 if a valid entry
Bit 6 1 for ASCII text file (.DO)
Bit 5 1 for machine lang. file (.CO)
Bit 4 1 for ROM file
Bit 3 1 for invisible file
Bit 2 Reserved for future use
Bit 1 Reserved for future use
Bit Internal use only
ROM ROUTINES
LCD FUNCTIONS
LCD— Displays a character on the LCD at the current cursor
position.
Entry Address : 4B44H (or RST 4)
Conditions: A = Character to be displayed
Exit Conditions : none
PLOT— Turn on one LCD pixel at the specified location.
Entry Address : 744CH
Entry Conditions: D = X coordinate (0-239)
E = Y coordinate (0-63)
Exit Conditions : none
UNPLOT— Turn off one LCD pixel at the specified location.
Entry Address : 744DH
Entry Conditions: D = X coordinate (0-239)
E = Y coordinate (0-63)
Exit Conditions : none
POSIT— Get the current LCD cursor position.
Entry Address : 427CH
Entry Conditions: none
Exit Conditions : H = Column Number (1-40)
L = Row Number (1-8)
ESCA— Send a specified Escape Code sequence.
Entry Address : 4270H
Entry Conditions: A = Escape Code
Exit Conditions : none
KEYBOARD FUNCTIONS
BRKCHK— Check for BREAK characters only (Control C or
Control S).
Entry Address : 7283H
Entry Conditions: none
Exit Conditions : Carry:Set if BREAK (CNTRL-C)
or PAUSE (CNTRL-S)entered.
Reset if no BREAK or PAUSE characters.
INLIN— Get a line from the keyboard-terminated by
(ENTER) .
Entry Address : 4644H
Entry Conditions: none
Exit Conditions : Data is stored at location F685H.
STFNK— Set Function Key definitions (F1-F8).
Entry Address : 5A7CH
Entry Conditions: HL = Address of function table.
Exit Conditions : none
V
44
TRS-80 Microcomputer News, November 1983
The function table consists of character strings to be used by the
keyboard driver when processing F1-F8 keys. Each string has a maxi-
mum length of 16 characters and is terminated by an 80H code. If the
last character of the string is ORed with 80H, that last character can also
serve as the terminator. The entire string (up to the 80H) will be placed in
the keyboard character buffer when the appropriate function key is
pressed. You must specify character strings for all eight function keys. To
leave a key undefined, use the 80H terminator as the definition of the
key. The user determines where in memory the table will reside.
Example of a function key table:
FCTAB
DEFM
'FILES'
i F1
DEFW
0D80H
DEFM
'LOAD'
; F2
DEFB
80H
DEFM
'SAVE'
; F3
DEFB
80H
DEFM
'RUN'
I F4
DEFW
0D80H
DEFM
'LIST'
; F5
DEFW
0D80H
DEFB
80H
; IGNORE F6
DEFB
80H
, IGNORE F7
DEFM
'MENU'
; F8
DEFW
0D80H
KYREAD— Scan keyboard for a key. Return with or without
one.
Entry Address i 7242H
Entry Conditions: none
Exit Conditions : A = Character, if any
Z Flag:
SET if no key
RESET if key found
Carry:
SET— Character in code Table below.
RESET— Normal character set code.
Note: Code Table is indicated if Carry is SET (1 ), Register A will contain one of
the following:
A
Key Pressed
F1
1
F2
2
F3
3
F4
4
F5
5
F6
6
F7
7
F8
8
LABEL
9
PRINT
OAH
SHIFT-PRINT
OBH
PASTE
CHGET— Get a character from keyboard. Wait for
character.
Entry Address : 12CBH
Entry Conditions: none
Exit Conditions : A = Character code.
Carry:
SET if special character.
RESET if normal character
Note: F1-F8 return preprogrammed text strings.
CHSNS— Check keyboard queue for characters.
Entry Address : 13DBH
Entry Conditions: none
Exit Conditions : Z Flag:
SET if queue is empty
RESET if keys are pending
KEYX— Check keyboard queue for characters or BREAK.
Entry Address : 7270H
Entry Conditions: none
Exit Conditions : Z. Flag:
SET is queue is empty
RESET if keys are pending
Carry:
SET if BREAK has been entered
RESET if any other key
iCLRFLK— Clear function key definition table (fills table with
80Hs.
Entry Address : 5A79H
Entry Conditions: none
Exit Conditions : none
DSPFNK— Display function keys
Entry Address : 42A8H
Entry Conditions: none
Exit Conditions : none
STDSPF— Set and display function keys.
Entry Address : 42A5H
Entry Conditions: HL = Start address of function table.
Exit Conditions : none
ERAFNK— Erase function key display.
Entry Address : 428AH
Entry Conditions: none
Exit Conditions : none
FN KSB— Display function table (if enabled).
Entry Address : 5A9EH
Entry Conditions: none
Exit Conditions : none
PRINTER FUNCTIONS
PRINTR— Send a character to the line printer.
Entry Address : 6D3FH
Entry Conditions: A = Character to be printed.
Exit Conditions : Carry:
SET if cancelled by BREAK
RESET if normal return
PNOTAB— Print character without expanding tab characters.
Entry Address : 1470H
Entry Conditions: A = Character to be printed.
Exit Conditions : unknown
PRTTAB— Print a character, expanding tabs to spaces.
Entry Address : 4B55H
Entry Conditions: A = Character to be printed.
Exit Conditions : unknown
PRTLCD-Print contents of LCD.
Entry Address : 1E5EH
Entry Conditions: none
Exit Conditions : none
RS-232C AND MODEM FUNCTIONS
DISC— Disconnect phone line.
Entry Address : 52BBH
Entry Conditions: none
Exit Conditions : none
CONN— Connect phone line.
Entry Address : 52D0H
Entry Conditions: none
Exit Conditions : none
DIAL— Dial a specified phone number.
Entry Address : 532DH
Entry Conditions: HL = Address of phone number information.
Exit Conditions : none
RCVX— Check RS-232 queue for characters.
Entry Address : 6D6DH
Entry Conditions: none
Exit Conditions : A = Number of characters in queue.
Z Flag:
SET if no data.
RESET if characters pending.
RV232C— Get a character from RS232 receive queue.
Entry Address : 6D7EH
Entry Conditions: none
Exit Conditions : A = Character received.
Z Flag:
SET if OK.
RESET if Error (PE, FF, or OF).
Carry:
SET if BREAK pressed.
RESET if no BREAK.
TRS-80 Microcomputer News, November 1983
45
SENDCQ— Send an XON (Control Q) resume character.
Entry Address : 6E0BH
Entry Conditions: none
Exit Conditions : none
SEN DCS— Send an XOFF (Control S) pause character.
Entry Address : 6E1EH
Entry Conditions: none
Exit Conditions : none
SD232C— Send a character to the RS-232 or Modem (with
XON/XOF).
Entry Address : 6E32H
Entry Conditions: A = Character to be sent.
Exit Conditions : Unknown
CARDET— Detect Carrier- Modem only
Entry Address : 6EEFH
Entry Conditions: none
Exit Conditions : Z Flag:
SET if carrier detected.
RESET if carrier not detected.
A = 00H if carrier
= FFH if no carrier detected
BAUDST-Set BAUD rate for RS-232C.
Entry Address : 6E75H
Entry Conditions: H = BAUD rate code (1-9, M)
Exit Conditions : None
INZCOM— Initialize RS-232C and Modem.
Entry Address : 6EA6H
Entry Conditions: H = BAUD rate code (1-9, M)
L = UART Configuration code.
Carry:
SET if RS-232C
RESET if Modem
Exit Conditions : none
Note: UART Configuration code is formed in one byte as follows:
BIT 0— Specifies number of Stop Bits (0 = 1, 1=2)
BITS 1-2— Parity Setting: 00 = None, 01 = Even, 1Q = Odd
BITS 3-4— Word Length: 0.0 = 6, 01 =7, 10 = 8
The byte is ANDed with 1FH to ignore bits 5-7.
Text string containing the current STAT setting is located at F65BH (5
bytes): BAUD, Length, Parity, Stop Bits, XON/XOFF switch.
SETSER— Set serial interface parameters and activate RS-
232/Modem.
Entry Address : 17E6H
Entry Conditions. HL = Start address of ASCII string containing serial
parameters, terminated by a binary zero (e.g.
78E1 E',0) The syntax of the string is the same
as the syntax for STAT in TELCOM.
Carry:
SET for RS-232C
RESET for Modem.
Exit Conditions : none
CLSCOM— Deactivate RS-232C/Modem.
Entry Address : 6ECBH
Entry Conditions: none
Exit Conditions : none
CASSETTE FUNCTIONS
CTON— Turn cassette motor on.
Entry Address : 14A8H
Entry Conditions: none
Exit Conditions : none
CTOFF— Turn cassette motor off.
Entry Address : 14AAH
Entry Conditions: none
Exit Conditions : none
CASIN— Read a character from cassette and update
checksum.
Entry Address : 14B0H
Entry Conditions: C = Current checksum.
Exit Conditions : A = Character
C = Updated checksum.
CSOUT— send a character to cassette and update
checksum.
Entry Address : 14C1H
Entry Conditions: A = Character to be sent.
C = Current checksum.
Exit Conditions : C = Updated checksum.
SYNCW— Write cassette header and sync byte only.
Entry Address : 6F46H
Entry Conditions: none
Exit Conditions : none
SYNCR— Read cassette header and sync byte only.
Entry Address : 6F85H
Entry Conditions: none
Exit Conditions : none
DATAW— Write a character to cassette-no checksum.
Entry Address : 6F5BH
Entry Conditions: A = Character to be sent.
Exit Conditions : none
DATAR— Read a character from cassette-no checksum.
Entry Address : 702AH
Entry Conditions: none
Exit Conditions : D = Character from cassette
OTHER ROUTINES
MUSIC— Make tone.
Entry Address : 72C5H
Entry Conditions: DE = Frequency
B = Duration
Exit Conditions : none
Note: See the Model 1 00 owners manual for Frequency and
Duration information.
TIME— Read system time.
Entry Address : 190FH
Entry Conditions: HL = Address of 8 byte area for TIME.
Exit Conditions : HL GD TIME (hh:mm:ss)
DATE— Read system date.
Entry Address : 192FH
Entry Conditions: HL = Address of 8 byte area for DATE,
Exit Conditions : HL GE3 DATE (mm/dd/yy)
DAY— Read system day of the week.
Entry Address :1962H
Entry Conditions: HL = Address of 3 byte area for DAY.
Exit Conditions : HL GD DAY (ddd)
INITIO— Cold start reset.
Entry Address :,6CD6H
Entry Conditions: none
Exit Conditions : none
IOINIT-— Warm start reset.
Entry Address : 6CE0H
Entry Conditions: none
Exit Conditions : none
MENU— Go to main menu.
Entry Address : 5797H
Entry Conditions: none
Exit Conditions : none
RAM FILE FUNCTIONS
MAKTXT— Create a text file.
Entry Address : 220FH
Entry Conditions: File name (max 8 bytes) must be stored in FILNAM
(FC93H). The 'DO' extension is not required.
Exit Conditions : HL = TOP address of the new file
DE- Address of directory file (Flag).
Carry: SET if file already exists.
RESET if new file
CHKDC— Search for file in directory.
Entry Address : 5AA9H
Entry Conditions: DE = Address of filename to find
(ASCII filename plus byte terminator)
46
TRS-80 Microcomputer News, November 1983
Exit Conditions ; HL = Start address (TOP) of file.
Z Flag:
SET if file not found
RESET if file found
GTXTTB— Get TOP address of file.
Entry Address : 5AE3H
Entry Conditions HL = Address of directory entry for file.
Exit Conditions : HL = TOP start address of file
KILASC— Kill a text (.DO) file.
Entry Address : 1 FBEH
Entry Conditions: DE = TOP start address of file
HL = Address of directory entry
Exit Conditions : none
INSCHR— Insert a character in a file.
Entry Address : 6B61 H
Entry Conditions: A = Character to insert
HL = Address at which to insert character.
Exit Conditions : HL = HL + 1
Carry:
SET if out of memory
MAKHOL— Insert a specified number of spaces in a file.
Entry Address : 6B6DH
Entry Conditions: BC = Number of spaces to insert
HL = address at which to insert spaces.
Exit Conditions : HL and BC are preserved
Carry:
SET if out of memory
MASDEL— Delete specified number of characters.
Entry Address : 6B9FH
Entry Conditions: BC = Number of characters to delete.
HL = Address at which to begin deleting.
Exit Conditions : HL and BC are preserved.
6B6DH
MAKHOL
6B9FH
MASDEL
6C93H
USED TO INIT FUNC
6CD6H
INITIO
6CE0H
IOINIT
6D3FH
PRINTR
6D6DH
RCVX
6D7EH
RV232C
6E0BH
SENSCQ
6E1EH
SENDCS
6E32H
SD232C
6E75H
BAUDST
6EA6H
INZCOM
6ECBH
CLSCOM
6EEFH
CARDET
6F46H
SYNCW
6F5BH
DATAW
6F85H
SYNCR
702AH
DATAR
7242H
KYREAD
7270H
KEYX
7283H
BRKCHK
72C5H
MUSIC
744CH
PLOT
744DH
UN PLOT
F639H
CSRY
F63AH
CSRX
F65BH
Current STAT setting
F962H
DIRTBL
FC93H
FILNAM
FEOOH
BEGLCD
FF40H
ENDLCD
12CBH
CHGET
13DBH
CHSNS
1470H
PNOTAB
14A8H
CTON
14AAH
CTOFF
14B0H
CASIN
14C1H
CSOUT
17E6H
SETSER
190FH
TIME
192FH
DATE
1962H
DAY
1E5EH
PRTLCD
1FBEH
KILASC
220FH
MAKTXT
4222H
CRLF
422DH
HOME
4231 H
CLS
4235H
SETSYS
423AH
RSTSYS
423FH
LOCK
4244H
UNLOCK
4249 H
CURSON
424EH
CUROFF
4253H
DELLIN
4258H
INSLIN
425DH
ERAEOL
4269H
ENTREV
426EH
EXTREV
4270H
ESCA
427CH
POSIT
428AH
ERAFNK
42A5H
STDSPF
42A8H
DSPFNK
4644H
INLIN
4B44H
LCD
4B55H
PRTTAB
52BBH
DISC
52D0H
CONN
532DH
DIAL
5797H
MENU
5A79H
CLRFLK
5A7CH
STFNK
5A9EH
FNKSB
5AA9H
CHKDC
5AE3H
GTXTTB
5B46H
FUNCTION KEY TABLE
6B61H
INSCHR
JO
Keysort— A Modified
Quicksort for the
Models 11/12
Joey Rodrigue
Keysort performs a quick sort on a user defined array.
First the program asks for the number of elements in the array
(not more than 1 00 unless you change the values in the three
arrays set up by the DIM statement in line 1 0). Then it prompts
you to enter each element until all the data is entered.
Once the data is entered, the program will query you for
the following information the first time the program is run and
after each sort.
START COLUMN?
NUMBER CHARACTERS?
START ELEMENT NUMBER?
NUMBER OF ELEMENTS?
1 CLEAR 20000
10 DIM SD$(100),SK%(100),ST%(100)
30 '
40 INPUT "NUMBER OF ELEMENTS ";NE%
: NS% = NE%
50 FOR 1% = 1 TO NE%
INPUT SD$(I%)
SK%(I%) = 1%
NEXT 1%
60 '
70 INPUT " START COLUMN ";SC%
80 INPUT " NUMBER CHARACTERS ";NC%
90 INPUT "START ELEMENT NUMBER ";SE%
100 INPUT " NUMBER OF ELEMENTS ";NE%
ii0 ;
120 GOSUB
130 '
TRS-80 Microcomputer News, November 1983
47
Color Computer
140 FOR 1% = 1 TO NS%
: PRINT SK%(I%),SD$(I%)
: NEXT 1%
150 '
160 GOTO 70
170 '
10000 ' KEYSORT (this is a modified QUICKSORT) x =
max NE%
10010 ' SD$(x) = sort data array SK%(x) = sort
key ST%(x) = sort temp
10020 ' NE% = number of elements to sort SE% =
starting element for sort
10030 ' SC% = starting character position NC% =
number of characters to sort
10040 ' TM$ = temporary string TM% =
temporary integer
10050 ' Returns string array SD$ sorted & integer
array SK% updated as needed
10060 '
10070 ' Set start and end points for sort
10080 Ll% = 1
: ST%(L1%) = NE% + 1
10090 Ml% = SE%
10100 '
10110 ' Set end of array segment & enter here for
partial sort
10120 Jl% = ST%(L1%)
10130 11% = Ml% - 1
: ' Set start of array segment
10140 IF Jl% - Ml% < 3 THEN GOTO 10480
10150 M2% = INT( (11% + Jl%) / 2)
10160 '
10170 ' find a large element among the small ones
10180 11% = 11% + 1
10190 IF 11% = Jl% THEN GOTO 10340
10200 IF MID$(SD$(I1%),SC%,NC%) <=
MID$(SD$(M2%),SC%,NC%) THEN GOTO 10180
10210 '
10220 ' find a small element among the large ones
10230 Jl% = Jl% - 1
10240 IF 11% = Jl% THEN GOTO 10340
10250 IF MID$(SD$(J1%),SC%,NC%) >=
MID$(SD$(M2%),SC%,NC%) THEN GOTO 10230
10260 '
10270 ' exchange out-of-order elements
10280 TM$ = SD$(I1%)
: IM% = SK%(I1%)
10290 SD$(I1%) = SD$(J1%)
: SK%(I1%) = SK%(J1%)
10300 SD$(J1%) = TM$
: SK%(J1%) = TM%
10310 GOTO 10180
10320 '
10330 ' array segment now divided, move compare
elements between
10340 IF 11% < M2% THEN GOTO 10370
10350 ri% = 11% - 1
10360 *
10370 IF Jl% = M2% THEN GOTO 10430
10380 TM$ = SD$(I1%)
: TM% = SK%(I1%)
10390 SD$(I1%) = SD$(M2%)
: SK%(I1%) = SK%(M2%)
10400 SD$(M2%) = TM$
: SK%(M2%) = TM%
10410 '
10420 ' save starting point for array segment of
large array
10430 Ll% = Ll% + 1
10440 ST%(L1%) = 11%
10450 GOTO 10120
: ' Repeat QUICKSORT of array segment of small
array
10460 '
10470 ' the following handles the 1 and 2 cases
10480 IF Jl% - Ml% < 2 THEN GOTO 10560
10490 '
10500 IF MID$(SD$(M1%),SC%,NC%) < MID$(SD$(M1% +
1),SC%,NC%) THEN GOTO 10560
10510 TM$ = SD$(M1%)
: TM% = SK%(M1%)
10520 SD$(M1%) = SD$(M1% + 1) : SK%(M1%) = SK%(M1% +
1)
10530 SD$(M1% + 1) = TM$
: SK%(M1% + 1) = TM%
10540 '
10550 ' set begin and end point for array segment of
large array
10560 Ml% = ST%(L1%)+1
10570 Ll% = Ll% - 1
10580 IF Ll% > THEN GOTO 10120
10590 '
10600 RETURN
: ' End of sort JE3
Hardy Weinberg
Equilibrium
Mark L. Fleischman
Syracuse University
Department of Anthropology
500 University Place
Syracuse, NY 13210
This Color Computer program is written in unextended
BASIC.
The Hardy-Weinberg Equilibrium equation is a simple
binomial expansion which is used in introductory biology and
anthropology courses to teach the rudiments of population
genetics. It is used to calculate gene frequencies. The most
common routine for which the equation is used in introduc-
tory courses is one which compares observed genotype
frequencies (e.g. data from the field) with the expected fre-
quencies obtained from H-W (P 2 + 2PQ + Q 2 = 1 ). The results
are then compared using Pearson's Chi Square test for
significance.
The program I have written does the following:
Lines 5-95 introduce the program and compute
genotype frequencies from whole numbers,
if the submitted data is not already in
frequency form;
Lines 100-120 compute gene frequencies from
genotype frequencies;
Lines 125-175 compute the H-W genotype
frequencies.
A subroutine, Line 400, converts the genotype frequen-
cies back to whole numbers in preparation for the Chi Square
subroutine, Line 500. After the Chi Square is obtained, the
result is compared to a value from the table which is signifi-
cant at 5%, and the results are declared to be or not to be
significant.
5 PRINT "HARDY-WEINBERG"
10 PRINT "P SQUARE + 2PQ + Q SQUARE=1"
15 PRINT "IS THE DATA IN FREQUENCY FORM? (PRINT YES OR
NO)"
20 INPUT A$
25 IF A$="YES"THEN 80
30 INPUT "IF YOUR DATA IS IN WHOLE NUMBERS , INPUT THE
NUMBER OF P SQUARE" ;F
35 INPUT "2PQ IS";G
40 INPUT "Q SQUARE IS";H
48
TRS-80 Microcomputer News, November 1983
45 PRINT F+G+H
50 FOR L=l TO 2000
51 NEXT L
55 I=F+G+H
60 PRINT "FREQ.P SQUARE="F/I
: PRINT "FREQ.2PQ="G/I
: PRINT "FREQ.Q SQUARE="H/l
65 FOR L=l TO 2000
66 NEXT L
70 X=F/I
: Y=G/I
: Z=H/I
75 GOTO 100
80 INPUT "TOTAL NUMBER OF PEOPLE";!
: 1 = 1
81 1=1
85 INPUT "P SQUARE=";X
86 PRINT "F="X*I
: F=X*I
90 INPUT "2PQ=";Y
91 PRINT "G="Y*I
: G=Y*I
95 INPUT "Q SQUARE=";Z
96 PRINT "H="Z*I
: H=Z*I
100 PRINT "P=X+Y/2="X+Y/2
105 PRINT "Q=Y/2+Z="Y/2+Z
110 FOR L=l TO 5000
111 NEXT L
115 P=X+Y/2
120 Q=Y/2+Z
125 PRINT "N="2
: N=2
130 GOSUB 2001
135 PRINT P"TO THE"N"IS"E
136 E=E
140 FOR L=l TO 1000
141 NEXT L
145 GOSUB 2070
150 PRINT Q"TO THE"N"I3"E1
151 E1=E1
155 FOR L=l TO 1000
156 NEXT L
160 PRINT "2PQ IS"2*P*Q
165 FOR L=l TO 1000
166 NEXT L
170 G1=2*P*Q
175 PRINT E"+"G1"+"E1"=1"
180 FOR L=l TO 2000
181 NEXT L
185 GOSUB 400
190 FOR L=l TO 1000
191 NEXT L
195 GOSUB 500
200 IF CK3.84 THEN 210
205 IF Cl>3.84 THEN 215
210 PRINT "NOT SIGNIFICANT AT .05 OR LESS"
: GOTO 220
215 PRINT "SIGNIFICANT AT .05. YOU ARE NOT IN
EQUILIBRIUM."
220 END
400 PRINT "X1="E*I
: X1=E*I
405 PRINT "Yl="Gl*I
: Yl=Gl*I
410 PRINT "Zl="El*I
: Zl=El*I
415 RETURN
500 REM THIS IS A ROUTINE FOR PEARSON'S CHI SQUARE
505 PRINT "SUM OF OBSERVED - EXPECTED SQUARED/EXP . "
510 PRINT "POWER OF N="N
515 GOSUB 3030
520 PRINT "(F-X1)SQRD./X1="E2/X1
525 A=E2/X1
530 PRINT "POWER OF N="N
535 GOSUB 3060
540 PRINT "(Y~2PQ)SQRD./2PQ="E3/Y1
545 C=E3/Y1
550 PRINT "POWER OF N="N
555 GOSUB 3090
560 PRINT "(Z-Z1)SQRD./Z1="E4/Z1
565 J=E4/Z1
570 PRINT "CHI SQUARE="A+C+J
: C1=A+C+J
57 5 RETURN
2000 REM THIS IS A ROUTINE FOR RAISING A NUMBER TO A
POWER
2001 E=l
2005 FOR A=l TO N
2010 E=E*P
2015 NEXT A
2020 IF N=0 THEN E=l
2025 RETURN
2070 El=l
2075 FOR A=l TO N
2080 E1=E1*Q
2085 NEXT A
2090 IF N=0 THEN El=l
2095 RETURN
3030 E2=l
3035 FOR B=l TO N
3040 E2=E2*(F-X1)
3045 NEXT B
3050 IF N=0 THEN E2=l
3055 RETURN
3060 E3=l
3065 FOR B=l TO N
3070 E3=E3*(G-Y1)
307 5 NEXT B
3080 IF N=0 THEN E3=l
3085 RETURN
3090 E4=l
309 5 FOR B=l TO N
3100 E4=E4*(H~Z1)
3105 NEXT B
3110 IF N=0 THEN E4=l
3115 RETURN
JQ
Larry Gurley
Route 1
Martin, TN 38237
I would like to share this Color Computer program with
your readers. The program is very helpful to me when I need
to calculate anything in Ohm's or Watt's law.
1 REM: THIS PROGRAM WILL CALCULATE OHMS , VOLTS , AMPS AND
CALCULATE ALL THE WATTS LAW.
2 REM: WRITTEN BY LARRY GURLEY, 1983
3 REM: INPUT VOLTS , AMPS .RESISTANCE, WATTS
4 PRINT "ENTER 'END' WHEN FINISHED"
5 PRINT
6 DIM A$(15),B(25)
10 INPUT "WHAT DO YOU WISH? IF OHMS LAW ENTER
VOLTS, AMPS, RESISTANCE. IF YOU WISH WATTS LAW
ENTER ENTER WATTS ." ;A$( 1 )
15 CLS
20 IF A$(l)="VOLTS" GOSUB 60
30 IF A$(1)="AMPS" GOSUB 110
40 IF A$(1)="RESISTANCE" GOSUB 160
50 IF A$(1)="WATTS" GOSUB 210
52 IF A$(1)="END" GOSUB 430
53 GOTO 10
55 END
TRS-80 Microcomputer News, November 1983
49
60 INPUT "AMPS = ";B(D
70 INPUT "RESISTANCE^ 1 ;B(2)
80 B(3)=B(1)*B(2)
90 PRINT "V0LTAGE=";B(3)
100 RETURN
105 END
110 INPUT "V0LTS=";B(4)
120 INPUT "RESISTANCE^' ;B( 5)
130 B(6)=B(4)/B(5)
140 PRINT "AMPS=";B(6)
150 RETURN
155 END
160 INPUT "V0LTS=";B(7)
170 INPUT "AMPS=";B(8)
180 B(9)=B(7)/B(8)
190 PRINT "RESISTANCE^' ;B(9)
200 RETURN
205 END
210 PRINT "YOU MUST INPUT VOLT, AMPS, WATTS"
211 CLS
215 PRINT
220 INPUT "YOU ARE NOW IN WATTS LAW****WHAT DO YOU
WISH TO FIND**VOLTS-AMPS-WATTS?";A$(2)
221 CLS
230 IF A$(2)="VOLTS"GOSUB 280
240 IF A$(2)="AMPS" GOSUB 330
250 IF A$(2)="WATTS" GOSUB 380
260 RETURN
270 END
280 INPUT "WATTS=";B(11)
290 INPUT "AMPS=";B(12)
300 B(13)=B(11)/B(12)
310 PRINT "VOLTS=";B(13)
320 RETURN
325 END
330 INPUT "WATTS=";B(14)
340 INPUT "VOLTS=";B(15)
350 B(16)=B(14)/B(15)
360 PRINT "AMPS=";B(16)
370 RETURN
37 5 END
380 INPUT "VOLTS=";B(17)
390 INPUT "AMPS=";B(18)
400 B(19)=B(17)*B(18)
410 PRINT *'WATTS=";B(19)
420 RETURN
430 END ^S
90
FOR Z=l TO
NEXT Z
K = l
2000
Plotting Ratios
Wayne Johnson
900 Rock Hill Road
Jefferson City, MO 65101
I have followed the Color Computer Programs in your
magazine since I purchased a 4K Color Computer in April
1982.
Here is a short program, 1 .7K, for all CoCo users. The
program is intended to accept twelve pieces of numerical
data, sort for the greatest value, and plot ratios of less than
one on a color bar graph.
1 REM**************************
20 REM COLOR HISTOGRAM FOR
30 REM COLOR COMPUTER
40 REM WRITTEN BY:
50 REM WAYNE JOHNSON
60 REM DATE: 3-25-83
7 REM**************************
80 CLS(4)
: PRINT @231 s " COLOR BAR GRAPH
100 CLS(3)
: POKE 65495,
: DIMQ(12), R(12)
110 PRINT @128, "THIS PROGRAM WILL AUTOMATICALLY PLOT
A MONTHLY COLOR BAR GRAPH WITH THE GREATEST
VALUE PLOTTED AS 1.0 AND THE BALANCE OF THE
VALUES AS RATIOS LESS THAN 1.0 ";
120 FOR Z=l TO 7000
: NEXT Z
: CLS
130 CLS
: PRINT
: PRINT "ENTER VALUES FOR EACH ITEM"
140 FOR C=l TO 12
PRINT "#"C" = ";
INPUT Q(C)
NEXT C
150 PRINT
: PRINT "VALUES ARE PLOTTED WITH THE
GREATEST VALUE AS 1.0, AND THE OTHERS AS A
RATIO LESS
THAN 1.0
. '
;
160
FOR Z=l TO
: NEXT Z
2500
170
FOR C=l TO
: A=Q(C)
12
180
IF B<=A THEN B=A
190
NEXT C
200
FOR C=l TO
12
: R(C)=Q(C)/B
: NEXT C
210
CLS(0)
220
CLS(0)
FOR V=l
TO 28
SET (6,
V, 5)
NEXT V
230
FOR H=6 TO
63
: SET (H,
28, 5)
: NEXT H
240
FOR H=5 TO
63 STEP 2
SET (H,
16, 5)
SET (H,
4, 5)
SET (H,
22, 5)
SET (H,
10, 5)
NEXT H
250
PRINT @ 33
"r";
PRINT @
129, "a"
PRINT @
225, "t"
PRINT @
321, "i"
PRINT @
417, "o"
260
PRINT (3 64
"1.0";
PRINT @
160, ".75"
PRINT @
256, ".50"
PRINT @
352, ".25"
PRINT @
448, "0.0"
270
FOR C=5 TO
27 STEP 2
READ Q$
PRINT @
480+C, Q$;
PRINT @
480+C+l, CHR$(128);
NEXT C
280
DATA j , f ,
m, a, m, j, j, a, s,
290
FOR C=l TO
12
: FOR H=4*C+5 TO 4*C+7
300
FOR V=28 TO 28-R(C)*(28-4) STEP
310
SET (H, V,
K)
: SET (H,
28, 5)
: SET (H+
1, 28, 5)
320
NEXT V
: NEXT H
: K=K+1
: IF K=9
THEN K=l
330
NEXT C
340
P
RINT @ 8,
"GREATES
r
;ALUE=";B;
50
TRS-80 Microcomputer News, November 1983
: RESTORE
350 Z$=INKEY$
: IF Z$="" THEN 350
360 CLS
PRINT
PRINT-
PRINT "DO YOU WISH TO CONTINUE WITH
SET OF TWELVE BAR GRAPHS";
370 INPUT Q$
: IF Q$="YES" THEN 130
380 IF Q$="NO" THEN 390 ELSE 360
390 CLS
: POKE 65494,
: END
ANOTHER
Color Math
Peter W. Smyth
412 Clark Court
Fort Ord, CA 93941
Here is a program I first wrote for my TRS-80 Model III
and later modified for my son's TRS-80 Color Computer. The
program is called TRS-80 Color Math. My five-year-old enjoys
learning on the computer and by adding size and color, his
attention is held much longer than by using smaller charac-
ters without color, as on my Model III.
This program may be viewed somewhat like a sample,
as it can easily be modified.
REMARKS:
COLOR-MATH
TRS-80 COLOR 16K
BY SFC PETER W. SMYTH
FOR PATRICK S. SMYTH
412 CLARK COURT
FT ORD, CA 93941
(408) 384-3759
1 DECEMBER 1982
CONVERTED FROM TRS-80
MODEL III 16K
(SAME AUTHOR)
SINGLE CHARACTER
ABOVE . . .
ANSWER AS
THIS PROGRAM WAS DESIGNED
TO ASSIST A CHILD WITH HIS/
HER MATH BY ADDING SIZE AND
COLOR TO THE LESSON, THERE-
FORE MAKING THE LEARNING
PROCESS MUCH MORE
INTERESTING.. .
****************************
FOR MENU, ENTER <T> ON ANY
ANSWER.. .
56 ' TO TERMINATE, ENTER <A> AS
58 ' ALL OTHER QUESTIONS,
INDICATED.
60 ' ****************************
100 CLEAR 400
110 DIM CN$(15, 4)
120 CLS
: PRINT @ 0, "HELLO, I AM YOUR COLOR COMPUTER.
130 PRINT @ 64, "MY NAME IS ALEX, WHAT IS YOUR
NAME?"
: PRINT
: INPUT NA$
140 PRINT @ 160, NA$;", THAT'S A NICE NAME."
150 PRINT @ 224, "IS ";NA$;","
PRINT "YOUR REAL NAME?"
PRINT
PRINT
PRINT " ( PLEASE ENTER Y OR N )"
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
540
550
560
570
580
590
600
610
620
630
640
650
660
670
680
690
700
710
720
730
740
750
760
770
780
IN$=INKEY$
: IF IN$="N" THEN 120 ELSE IF IN$ = "Y" THEN 17(2
ELSE 160
CLS
PRINT @ 32, "WHAT WOULD YOU LIKE TO DO "
PRINT
PRINT NA$;"?"
PRINT
PRINT "********************************"
PRINT "COLOR MATH (ENTER ONE)"
PRINT
: PRINT
: PRINT " 1. ADDITION + 2.
SUBTRACTION -"
PRINT
: PRINT "********************************"
IN$=INKEY$
: IF IN$="" THEN 220
IF IN$ ="1" THEN CZ=1 ELSE IF IN$ ="2" THEN CZ=2
ELSE GOTO 220
P = -1
IF SW > THEN GOTO 1050
CLS
: PRINT @ 64, " trs color-math. .. compiling ";
' : > zero
DATA 142, 140, 140, 141
DATA 138, 128, 128, 133
DATA 138, 128, 128, 133
DATA 139, 131, 131, 135
GOSUB 1800
' : > one
DATA 128, 141, 128, 128
DATA 128, 133, 128, 128
DATA 128, 133, 128, 128
DATA 128, 133, 128, 128
GOSUB 1910
' : > two
DATA 140, 140, 140, 141
DATA 131, 131, 131, 135
DATA 138, 128, 128, 128
DATA 139, 131, 131, 131
GOSUB 1910
' . > three
DATA 140, 140, 140, 141
DATA 131, 131, 131, 135
DATA 128, 128, 128, 133
DATA 131, 131, 131, 135
GOSUB 1910
' : > four
DATA 138, 128, 128, 138
DATA 139, 131, 131", 139
DATA 128, 128, 128, 138
DATA 128, 128, 128, 138
GOSUB 1910
' : > five
DATA 142, 140, 140, 140
DATA 139, 131, 131, 131
DATA 128, 128, 128, 133
DATA 131, 131, 131, 135
GOSUB 1910
' : > six
DATA 142, 140, 140, 140
DATA 139, 131, 131, 131
DATA 138, 128, 128, 133
DATA 139, 131, 131, 135
GOSUB 1910
' : > seven
DATA 140, 140, 140, 141
DATA 128, 128, 128, 133
DATA 128, 128, 128, 133
DATA 128, 128, 128, 133
GOSUB 1910
1 : > eight
DATA 142, 140, 140, 141
DATA 139, 131, 131, 135
DATA 138, 128, 128, 133
TRS-80 Microcomputer News, November 1983
51
790 DATA 139, 131
800 GOSUB 1910
810 ' : > nine
131, 135
820 DATA 142, 140,
140,
141
830 DATA 139, 131,
131,
135
840 DATA 128, 128,
128,
133
850 DATA 131, 131,
131,
135
860 GOSUB 1910
870 ' : > plus
880 DATA 128, 133,
138,
128
890 DATA 131, 135,
139,
131
900 DATA 128, 133,
138,
128
910 DATA 128, 133,
138,
128
920 GOSUB 1910
930 ' : > equals
940 DATA 128, 128,
128,
128
950 DATA 140, 140,
140,
140
960 DATA 131, 131,
131,
131
970 DATA 128, 128,
128,
128
980 GOSUB 1910
990 ' : > minus
1000 DATA 128, 128
, 128
, 128
1010 DATA 131, 131
, 131
, 131
1020 DATA 128, 128
,128,
, 128
1030 DATA 128, 128
, 128.
, 128
1040 GOSUB 1910
1050 CLS
: SW = 1
1060 FOR KN = TO
1000
STEP
1070 L = 96
1080 P = RND(9)
1090 IF P = 9 THEN P =
1100 PI = P
1110 GOSUB 1710
1120 L = 104
1130 IF CZ=1 THEN P=10 ELSE IF CZ=2 THEN P=12
1140 GOSUB 1710
1150 L = 112
1160 P = RND(5)
1170 IF P = 5 THEN P =
1180 IF P>P1 AND CZ=2 THEN P=Pl-l
1190 IF P1=0 OR P<0 THEN P=0
1200 P2 = P
1210 GOSUB 1710
1220 L = 120
1230 P = 11
1240 GOSUB 1710
1250 L = 190
1260 P = 13
1270 GOSUB 1710
1280 IF CZ=1 THEN ANS=Pl+P2 ELSE IF CZ=2 THEN
ANS=P1-P2
1290 TAN$ = STR$(ANS)
1300 LA = LEN(TAN$)
1310 IF LA = 2 THEN GOSUB 1370 ELSE GOSUB 1470
1320 PRINTS 482, "PRESS spacebar TO CONTINUE.":
1330 H$=INKEY$
: IF H$="" THEN 1330
1340 CLS(0)
1350 NEXT KN
1360 END
1370 ' : — > SUBROUTINE one-char
1380 IN$=INKEY$
: IF IN$="" THEN 1380
1390 IF IN$ = "T" THEN GOTO 170
1400 IF IN$ = "A" THEN GOTO 1950
1410 IN = VAL(IN$)
1420 L = 298
1430 P = IN
1440 IF IN = ANS THEN GOSUB 1710
: RETURN
1450 GOSUB 1610
1460 RETURN
1470 ' : — > SUBROUTINE two-char
1480 IN$=INKEY$
: IF IN$="" THEN 1480
1490 IF IN$ = "T" THEN 170
1500 IF IN$ = "A" THEN 1950
1510 PRINT @ 298, IN$;
1520 IS$=INKEY$
: IF IS$="" THEN 1520
1530 PRINT @ 298, IN$ + IS$;
1540 L = 298
1550 P = VAL(IN$)
1560 IF (VAL(IN$+IS$)) = ANS THEN GOSUB 1710 ELSE
GOSUB 1610
: RETURN
1570 L = 306
1580 P = VAL(IS$)
1590 GOSUB 1710
1600 RETURN
1610 ' : — > SUBROUTINE error
1620 FOR I = 1 TO 50 STEP 1
1630 SOUND 1+150, 1
1640 CLS (RND(8))
1650 NEXT I
1660 SOUND 1, 7
1670 CLS(0)
1680 PRINT @ 64, NA$;",";
: PRINT @ 135, "THE CORRECT ANSWER IS:";
1690 PRINT @ 271, ANS;
1700 RETURN
1710 ' : > SUBROUTINE draw
1720 FOR I = TO 3 STEP 1
1730 PRINT @ L, CN$(P, I);
1740 L = L + 32
1750 NEXT I
1760 RETURN
1770 ' : — > SUBROUTINE color
1780 RC = ((RND(7)) * 16)
1790 RETURN
1800 ' : — > SUBROUTINE input
1810 P = P + 1
1820 FOR J = TO 3 STEP 1
1830 NUM$ = ""
1840 FOR M = TO 3 STEP 1
1850 READ NUMBER
1860 NUM$=NUM$+-CHR$(NUMBER+RC)
1870 NEXT M
1880 CN$(P, J) = NUM$
1890 NEXT J
1900 RETURN
1910 ' : — > SUBROUTINE create
1920 GOSUB 1770
1930 GOSUB 1800
1940 RETURN
1950 ' : — > END OF RUN.. .
1960 CLS
1970 PRINT @ 64, NA$;", IT WAS FUN."
: PRINT @ 128, "BYE-BYE "
1980 END ^1
Definition Quiz
Jeff Coburn
16 Wynchwood Road
Livingston, NJ 07039
Here is a Color Computer program that quizzes the user
on words and their definitions. The user inputs his own words
and definitions.
10 REM U STANDS FOR UNIMPORTANT
20 REM VARIABLE AND WILL BE USED
30 REM WHENEVER POSSIBLE.
40 CLS 5
50 PRINT @ 32, "QUIZ - DESIGNED BY JEFF COBURN"
60 PRINT @ 96, "FOR INSTRUCTIONS, PRESS ENTER."
70 PRINT @ 160, "ANY OTHER KEY BEGINS THE PROGRAM";
52
TRS-80 Microcomputer News, November 1983
80 U$=INKEY$
90 IF U$="" THEN 80
100 IF U$=CHR$(13) THEN 670
110 CLS
120 REM W$ IS THE WORD
130 REM D$ IS THE DEFINITION
140 W$=""
: D$=""
150 DIM W$(600)
160 DIM D$(600)
170 FOR 1=1 TO 50
180 CLS
190 PRINT "#"; I;
200 INPUT "WORD? "; W$(I)
210 IF W$(I)="BEGIN QUIZ" OR W$(I)="BQ" THEN 270
220 PRINT "#"; I;
230 INPUT "DEFINITION? "; D$(I)
240 IF D$(l)="BEGIN QUIZ" OR D$(D="BQ" THEN 270
250 CLS
260 NEXT I
270 REM CHOOSE SECTION W TO D OR D TO W
280 PRINT
: PRINT
290 PRINT "PLEASE CHOOSE 1, 2, OR 3:"
300 PRINT "1 GUESS WORD FROM DEFINITION"
310 PRINT "2 GUESS DEFINITION FROM WORD"
320 PRINT "3 END PROGRAM"
330 INPUT N
340 N=INT(N)
350 IF N<1 OR N>3 THEN 330
360 IF N=l THEN 390
370 IF N=2 THEN 500
380 IF N=3 THEN 610
390 CLS
: PRINT "YOU WILL BE GUESSING THE WORD FROM THE
DEFINITION."
400 PRINT "WHEN ALL DEFINITIONS HAVE BEEN GIVEN AND
ALL WORDS GUESSED, TOE PROGRAM WILL LET YOU
CHOOSE THE OTHER TYPE (GUESS DEFINITION FROM
WORD . "
410 PRINT
420 FOR 1=1 TO 50
430 IF D$(I)="BQ" OR W$(I)="BQ" THEN 270
440 PRINT "#"; I;
450 PRINT D$(I)
460 INPUT "? "; C$
470 PRINT "ANSWER IS..."; W$(I)
480 NEXT I
490 GOTO 270
500 CLS
510 PRINT "YOU WILL GUESS THE DEFINITION FROM THE
WORD. WHEN ALL WORDS HAVE BEEN GIVEN AND ALL
DEFINITIONS GUESSED, THE PROGRAM WILL LET YOU
CHOOSE THE OTHER TYPE (GUESS WORD FROM
DEFINITION."
520 PRINT
530 FOR 1=1 TO 50
540 IF D$(I)="BQ" OR W$(I)="BQ" THEN 270
550 PRINT "#"; I;
560 PRINT W$(I)
570 INPUT "? "; C$
580 PRINT "ANSWER IS... "; D$(l)
590 NEXT I
600 GOTO 270
610 PRINT "ARE YOU SURE YOU WISH TO STOP??";
620 INPUT " YES/NO"; U$
630 IF U$<>"YES" THEN 280
640 PRINT "HOPE YOU LEARNED SOMETHING!"
650 PRINT "GOODBYE"
660 END
670 CLS
680 PRINT "THIS PROGRAM ALLOWS YOU TO QUIZ YOURSELF
ON WORDS AND THEIR DEFINITIONS."
690 PRINT "JUST ENTER THE WORD OR DEFINITION AT THE
PROMPT. WHEN YOU ARE DONE TYPE IN BQ OR BEGIN
QUIZ TO START."
700 INPUT "PRESS ENTER TO START"; US
710 GOTO 110
J2
Density
James W. Wood
Box 507
Atwood, IL 61913
A science teacher's delight, this program lets a student
practice a density lab.
An irregular solid's volume is found by displacement of
water. Figure 1 shows the difference in water levels caused
by lowering an insoluble object into the graduated cylinder.
This difference is the object's volume. Figure 2 displays a
triple beam balance used to determine the object's mass. The
density is found by dividing the object's mass by its volume.
The program will generate different masses and volumes for
each run. There are also three multiple choice questions
about the lab exercise that was performed.
...8SJ
Figure 1.
Figure 2.
10 'JAMES W. WOOD, 424 N. MISSOURI, ATWOOD, IL, 61913
20 W$(0)="D9R4U9L4"
W$(1)="D9"
W$(2)="R4D4L4D5R4"
W$(3)="R4D4L4R4D5L4"
W$(4)="D4R4U4D9"
W$(5)="R4L4D4R4D5L4"
W$(6)="D9R4U4L4"
W$(7)="R4D9"
W$(8)="R4D4L4U4D9R4U5"
W$(9)="D4R4U4L4R4D9"
30 L=RND(16)
: W=RND(16)
: H=RND(16)
TRS-80 Microcomputer News, November 1983
53
40 CLS
: PRINT @42,
50 PRINT
: INPUT "YOUR NAME"; NA$
60 GOTO 840
70 FOR A=l TO 800
NEXT A
PRINT " NOW
PRINT "LEARN HOW TO USE
80 PRINT
: PRINT " TO MOVE
90 PRINT " 10 GRAM
100 GRAM
1 GRAM
'DENSITY LAB"
100 PRINT
110 PRINT "
120 PRINT "
130 PRINT
PRINT
M
USE
IT
A
IS TIME
BALANCE
TO
A,
PRESS"
W"
S"
LEFT
X"
RIGHT"
5
131),
PSET
122),
146),
PSET,
PSET,
BF
BF
YOU MUST HAVE THE INDICATOR"
PRINT "POINTING STRAIGHT RIGHT TO BE"
PRINT "BALANCED."
140 PRINT "PRESS <ENTER> TO CONTINUE";
150 A$=INKEY$
: IF A$="" THEN 150
160 PMODE 2, 1
: PCLS
: SCREEN 1, 1
170 DRAW "BM6, 90R80D10L35D20R45U30R134D42R5L5D
36L134U24L45D30R195U60R7D70L230U15R10U70L27U8"
180 IF W$="R" THEN LINE (20, 60)-(60, 90), PSET, BF
ELSE CIRCLE (45, 82), 19, 5, .45
: PAINT (45, 76), 5,
190 LINE (246, 131)-(250,
200 LINE (100, 120)-(225,
210 LINE (100, 144)-(225,
220 DRAW "BM110.
230 DRAW "BM122.
240 DRAW "BM134.
250 DRAW "BM146 :
260 DRAW "BM158 :
270 DRAW "BM170,
280 DRAW "BM182
290 DRAW "BM194
300 DRAW "BM206
310 DRAW "BM218
320 DRAW "BM120
330 DRAW "BM152
340 DRAW "BM158
350 DRAW "BM166
360 DRAW "BM182
370 DRAW "BM190
380 DRAW "BM198
390 FOR X=110 TO 218 STEP 12
400 LINE (X, 107)-(X+4, 114), PSET
: NEXT X
410 DRAW "BM122, 95XW$(1);
'420 DRAW "BM134, 95XW$(2);
430 DRAW "BM146, 95XW$(3);
440 DRAW "BM158, 95XW$(4);
450 DRAW "BM170, 95XW$(5);
460 DRAW "BM182, 95XW$(6);
470 DRAW "BM194, 95XW$(7);
480 DRAW "BM206, 95XW$(8);
490 DRAW "BM218, 95XW$(9);
500 Bl=107
B2=117
B3=93
B4=124
B5=150
Cl=107
510 LINE (Bl, B3)-(Bl+9, B3+25), PSET, B
520 LINE (B2, B4)-(B2+30, B4+14), PSET, B
530 LINE (Bl, B5)-(Bl+9, B5+14), PSET, B
540 LINE (235, 131)-(245, 122), PSET
550 A$=INKEY$
: IF A$="" THEN 550
560 IF ASC(A$)=13 THEN 670
570 IF A$="Q" THEN Q1=Q1-1
152XW$(0)
152XW$(1)
152XW$(2)
152XW$(3)
152XW$(4)
152XW$(5)
152XW$(6)
152XW$(7)
152XW$(8)
152XW$(9)
126XW$(0)
126XW$(1)
126XW$(0)
126XW$(0)
126XW$(2)
126XW$(0)
126XW$(0)
: IF QK0 THEN Q1=0 ELSE LINE (Bl , B3)-(Bl+9,
B3+25), PRESET, B
B1=B1-12
LINE (Bl, B3)~(Bl+9, B3+25), PSET, B
GOTO 640
580 IF A$="W" THEN Q1=Q1+1
: IF Ql>9 THEN Ql=9 ELSE LINE (Bl , B3)-(Bl+9,
B3+25), PRESET, B
B1=B1+12
LINE (Bl, B3)-(Bl+9, B3+25), PSET, B
GOTO 640
590 IF A$="A" THEN Al=Al-l
: IF AK0 THEN Al=0 ELSE LINE (B2, B4)-(B2 + 30,
B4+14), PRESET, B
B2=B2-30
LINE (B2, B4)-(B2+30, B4+14), PSET, B
GOTO 640
IF A$="S" THEN A1=A1+1
: IF Al>2 THEN Al=2 ELSE LINE (B2, B4)~(B2+30,
B4+14), PRESET, B
B2=B2+30
LINE (B2, B4)-(B2+30, B4+14), PSET, B
GOTO 640
610 IF A$="Z" THEN Zl=Zl-l
: IF Z1<0 THEN Zl=0 ELSE LINE (Cl , B5)-(Cl+9,
B5+14), PRESET, B
C1=C1-12
LINE (Cl, B5)-(Cl+9, B5+14), PSET, B
GOTO 640
620 IF A$="X" THEN Zl=Zl+l
: IF Zl>9 THEN Zl=9 ELSE LINE (Cl, B5)~(Cl+9,
B5+14), PRESET, B
C1=C1+12
LINE (Cl, B5)-(Cl+9, B5+14), PSET, B
GOTO 640
630 GOTO 550
640 IF M>Q1*10+Al*100+Zl THEN LINE (235, 131)-(245,
122), PSET
LINE (235, 131)-(245, 131), PRESET
LINE (235, 131)-(245, 140), PRESET
GOTO 550
650 IF Ql*10+Al*100+Zl=M THEN LINE (235, 131)-(245,
122), PRESET
LINE (235, 131)-(245, 131), PSET
LINE (235, 131)-(245, 140), PRESET
GOTO 550
660 IF Q1*10+A1*100+Z1>M THEN LINE (235, 131)-(245,
122), PRESET
LINE (235, 131)-(245, 131), PRESET
LINE (235, 131)-(245, 140), PSET
GOTO 550
670 CLS
: PRINT NA$; ", HOW MANY UNITS MASS";
: INPUT GR
680 IF GR=M THEN 700
690 PRINT "FUNNY, I MEASURED"; M; " UNITS"
: GOTO 710
700 PRINT "AT LEAST YOU CAN USE A BALANCE."
710 IF W$="R" THEN DE=M/(L*W*H) ELSE DE=M/(D2-D1)
720 DE=(INT(DE*100))/100
730 PRINT "THE MASS IS "; M
: PRINT "THE VOLUME IS ";
: IF W$="R" THEN PRINT L*W*H ELSE PRINT D2-D1
740 PRINT "OK "; NA$; ",";
750 INPUT "WHAT IS THE DENSITY"; DD
760 PRINT "TRUE VALUE=" ; DE
: PRINT "% ERROR=" ;
INT((ABS(DE-DD)/DE)* 10000 )/100; "%"
770 IF INT((ABS(DE-DD)/DE)*10000)/100 >5 THEN PRINT
NA$
: PRINT "DID YOU DIVIDE MASS BY VOLUME?"
780 GOSUB 1090
790 PRINT "ANOTHER LAB , "; NA$; " (Y/N)"
800 A$=INKEY$
: IF A$="" THEN 800
810 IF A$="Y" THEN RUN
54
TRS-80 Microcomputer News, November 1983
PRINT
PRINT
PRINT
820 IF A$="N" THEN END
830 GOTO 800
840 M=10+RND{30)
850 CLS
PRINT "THE DENSITY OF AN OBJECT IS"
PRINT "EQUAL TO ITS MASS DIVIDED BY"
PRINT "VOLUME. D=M/V"
PRINT "TO FIND THE VOLUME OF IRREGULAR"
"SOLIDS HE USE A GRADUATED"
"CYLINDER. THE OBJECT'S VOLUME"
"IS EQUAL 10 THE DIFFERENCE IN"
860 PRINT "WATER LEVELS BEFORE AND AFTER"
PRINT "THE OBJECT IS PLACED IN THE"
PRINT "CYLINDER. BE SURE THE OBJECT IS"
PRINT "COMPLETELY SUBMERGED."
870 PRINT "EACH LINE ON THE CYLINDER"
: PRINT "REPRESENTS 1 CUBIC CENTIMETER."
: PRINT "READ CYLINDER FROM BOTTOM UP"
880 PRINT "PRESS <ENTER> TO CONTINUE"
890 A$=INKEYS
: IF A$OCHR$(13) THEN 890
900 D1=15+RND(10) J
: D2=35+RND( 12)
910 PMODE 3, 1
NA$ ELSE
M2;
Ml
PCLS
: SCREEN 1 ,
920
DRAW "BM100, I0G5F5D155L10D2R40U2L10U165L20
930
FOR A=25 TO 175
STEP 3
: LINE (100, A)-(120, A), PSET
: NEXT A
940
FOR A=25 TO 175
STEP 15
: LINE (120, A)-(123, A), PSET
: NEXT A
950
DRAW "BM128, 22XW$(5) ;"
DRAW "BM137,
22XW$(0);"
DRAW "BM128,
37XW$(4);"
DRAW "BM137 ,
37XW$(5);"
DRAW "BM128,
52XW$(4);"
DRAW "BM137,
52XW$(0);"
DRAW "BM128,
67XWS(3);"
DRAW "BM137,
67XW$(5);"
DRAW "BM128,
82XW$(3);"
DRAW "BM137 ,
82XW$(0);"
960
DRAW "BM128, 97XW$(2);"
DRAW "BM137 ,
97XWS(5);"
DRAW "BM128,
112XWS(2);"
DRAW "BM137,
112XW$(0);"
DRAW "BM130,
127XWS(1);"
DRAW "BM137,
127XWSC5);"
DRAW "BM130,
142XW$(1) ; "
DRAW "BM137 ,
142XWS(0);"
DRAW "BM137 ,
157XW$(5);"
970
E1=176-3*D1
: £2=176-3*02
980
FOR A=I73 TO Ei
STEP -3
PAINT (110,
A), 3, 4
1070 PRINT "VERY GOOD "; NA$
: INPUT "WHAT IS THE VOLUME OF THE OBJECT IN
CUBIC CENTIMETERS"; VZ
: IF VZ=M2-M1 THEN PRINT "CORRECT
PRINT "SORRY "; NAS;
M2-M1
1080 GOTO 70
1090 m=a
PRINT
PRINT
PRINT
PRINT
PRINT
PRINT
1100 AN$=INKEY$
: IF AN$="B"
ANSWER IS A"
GOTO 1110 ELSE IF ANS="A" THEN NC=NC+1
PRINT "CORRECT "; NA$
GOTO 1110 ELSE 1100
1110 PRINT
: PRINT "HOW IS THE VOLUME OF AN IRREGULAR
OBJECT FOUND?"
PRINT
A) LENGTH*WIDTH*HEIGHT"
B) WATER DISPLACEMENT"
C) BY GUESSING"
'HOW IS DENSITY CALCULATED?"
' A) MASS DIVIDED BY VOLUME"
1 B) VOLUME DIVIDED BY MASS"
1 C) LENGrH/WIDTH/HEIGHT*MASS'
OR AN$="C" THEN PRINT "SORRY, THE
OR AN$="C" THEN PRINT "SORRY, THE
PRINT
PRINT
PRINT
1120 AN$=INKEYS
: IF AN$="A"
ANSWER IS B"
GOTO 1130 ELSE IF AN$="B" THEN NC=NC+1
PRINT "CORRECT "; NAS
GOTO 1130 ELSE 1120
1130 PRINT
: PRINT " YOU ARE USING A TRIPLE BEAM
BALANCE. THE OBJECT IS HEAVIER THAN THE WEIGHT
FOR WHICH THE BALANCE IS SET."
PRINT " THE POINTER WILL POINT"
PRINT
PRINT " A) UP"
PRINT " B) DOWN"
PRINT " C) RIGHT"
1140 ANS=INKEY$
: IF AN$="B" OR AN$="C" THEN PRINT "SORRY, THE
ANSWER IS A"
GOTO 1150 ELSE IF ANS="A" THEN NC=NC+1
PRINT "CORRECT "; NAS
GOTO 1150 ELSE 1140
1150 PRINT "YOU ANSWERED"; NC ; "OUT OF 3"
: PRINT "QUESTIONS CORRECTLY."
: RETURN J!
Radio /hack
2.2
PSET
: NEXT A
990 A$=INKEY$
: IF A$OCHRS(13) THEN 990
1000 CIRCLE (110, 153), 9, 2,
1010 PAINT (110, 143), 2, 2
1020 FOR A=124 TO 175 STEP 3
: LINE (100, A)-(120, A)
: NEXT A
1030 FOR A=E1 TO E2 STEP -3
: PAINT (110, A), 3, 4
: NEXT A
1040 A$=INKEY$
: IF A5<>CHR$(13) THEN 1040
1050 CLS
! INPUT "INITIAL VOLUME (CC)"; Ml
: INPUT "FINAL VOLUME (CC)"; M2
1060 IF MlODl OR M2<>D2 THEN PRINT "TRY AGAIN"
: FOR A=l TO 500
: NEXT A
: GOTO 910
TRS-80 Microcomputer News, November 1983
55
Radio Shack Computer Centers
Now 416 Nationwide
ALABAMA
BIRMINGHAM 2428 Green Springs Hwy . 9233 Parkway East
HUNTSVIUE 1400 N Memorial Pkwy.
MOBILE 405 Bel-Air Blvd
MONTGOMERY *24 Union Square 5/C
ARIZONA
PHOENIX 10233 Meiro Pkwy £ . 4301 N 7lh. Ave
SCOTTSDALE 2525 N. Scotlsdale Rd
TEMPE 33 E Broadway
TUCSON 5622 E Broadway. CampOeil Plaza, 2830 N
Campbell Ave
ARKANSAS
LITTLE ROCK Town & Country S/C. University S Asher
CAUFORNIA
ANAHEIM 509 Katella
BAKERSFIELD 2018 Chester Ave
BERKELEY 1922 Grove St
BEVERLY HILLS 8500 Wilshire Blvd.
BREA Imperial Shopping Center. 391 South State College
CANOGA PARK 8371 Topanga Canyon
CARMICKAEL 6305 Fairoaks Blvd.
CHICQ 1834 Mangrove Ave.
CHUU VISTA 1201 3rd Ave .
CITRUS HEIGHTS 7405 Green Back Ln. at San Juan
DOWNEY 8031 Florence Ave
EL TOHO El Toro Rd at San OieQO Freeway
ESC0N0I0O 347 W Mission Ave
FREMONT Fremont Hub, 39114 Fremont
FRESNO Princeton S/C, 2721 N. Blackslone Ave.
GARDEN GROVE 12821 Knott St
GLENOALE 236 N Brand Blvd
HAYWARD 24784 Hespenan Blvd
HOLLYWOOD 6922 Hollywood Blvd
IRVINE Radhill at Main Si
LAKEWOOO 5S30 Lakewood Blvd.
LA MESA 5346 Jackson Dr
LONG BEACH 2119 BeliriDwef 8-vd.
LOS ANGELES 740 S. Olive St , 5240 Century Blvd (Airport
area)
MODESTO 221 Mc Henry Ave
MONTCLAIR 5237 Arrow Hwy.
MONTEREY 484 Washington St
MOUNTAIN VIEW 1933 FJ Camino Real W
OAKLAND 1733 Broadway. (415) 753-3183
PASADENA 575 S. Lake Ave.
PLEASANT HILL 508 G Contra Costa Blvd
RIVERSIDE 3844 La Sierra Ave
SACRAMENTO 4749 J St
SAN BERNARDINO 764 Inland Center Or
SAN OIEGD 3062 Clairemonl Dr , 3902 El Capn Blvd
SAN FRANCISCO One Market Place; 2920 Geary Blvd.
SAN JOSE 1228 S. Bascom Ave
SAN MATEO 3180 Campus Dr.
SANTA ANA 2320 S Fairview St. (at Warner)
SANTA BARBARA 4141 State St A-1
SANTA FE SPRINGS 14133 East Firestone Blvd
SANTA MONICA 511 Wilshire Btvd
SANTA ROSA 823 4th Si.
SHERMAN OAKS 14936 Ventura Blvd
STOCKTON College Sq S/C, 963 West March Lane
TARZANA 18545 Ventura Blvd.
TORRANCE 3340 Sepulveda at Hawthorne
VENTURA 4005 E Main SI
WEST COVINA 2516 E. Workman St
COLORADO
BOULDER Arapahoe Plaza, 3550 Arapahoe
COLORADO SPRINGS 4341 N. Academy
DENVER 8000 E. Oumcy: Green Briar Ptaja. 7075 Pecos
LAKEWOOD 2099 Wadswortti Btvd.
CONNECTICUT
EAST HAVEN 51 Froniage Rd
FAIRFIELD 1196 Kings Hwy & Rl. 1
HARTFORD Tne Richardson Bldg,. 942 Main St.
MANCHESTER 228 Spencer St
NQRWALK Rl. 7-345 Main Ave.
ORANGE Woolco S/C. 538 Bosion Post Rd
WATERBURY 105 Bank St
WATERFORD 122 Boston Port Rd.
WEST HARTFORD 39 S Main St
DELAWARE
DOVER Edgehiii Shop. Cu. Rt. #13
WILMINGTON 3847 Kirkwood Hwy
DISTRICT OF COLUMBIA
N.W, WASHINGTON 1800 M St.. 15th S L St.; Van Ness
Station. 4250 Conneclicut Ave.
FLORIDA
ALTAMONTE SPRINGS 766 B East Altsmonte Dr.
BOCA RATON 1662 N, Federal Hwy.
CLEARWATER 2460-0 US 19 North
DAYTONA BEACH Volusia Plaza
FT. LAUDERDALE 4368 i\l Federal Hwy
FORT MYERS E dison Mall
FORT PIERCE Center West Shopping Center. US Hwy 1 .
GAINESVILLE 3315 Archer Rd.
HOLLYWOOD 42g s. State Rd #7
JACKSONVILLE 8252 Arlington Exprwy ., Roosevelt Mall,
Roosevelt Btvd.
LAKELANO2810S. Florida Ave.
LAUDERDALE LAKES 4317-25 N State Rd 7
MERRITT ISLAND 700 E Merntt Island Causeway
MIAMI 9459 S. Dixie Hwy., 1601 Biscayne Blvd.; 15 SE.
2nd Ave.. 20761 S. Dixie Hwy.
N. MIAMI BEACH The Promenade. 1777 N.E. 163rd St.
ORLANDO 1238 E. Colonial Dr
PENSACOLA Eastgate Shopping Center. 6925 N. 9th Ave
ST. PETERSBURG 3451 66th St. N
SARASOTA 5251 S. Tamiami Tr. (Hwy.41)
TALLAHASSEE 2529 S Adams
TAMPA 4555 W Kennedy; 1825 E. Fowler Ave.
W. PALM BEACH 2271-A Palm Beach Lakes Btvd
GEORGIA
AUGUSTA 3435 Wrigtitsooro Rd,
ATLANTA 2108 Henderson Mill; 49 W Paces Ferry; Akers
Mill S/C. 2937 Cobb Parkway WW., 113 Peachlree St
COLLEGE PARK 5309 Ola National Hwy.
COLUMBUS Coiumbus Square Mall. 3050 Macon Rd.
DORAVILLE 5697 Buford Hwy
MACON 1467 Eisenhower Pkwy
SAVANNAH Chatham Plaza. 7805 AOercorn St.
HAWAII
HONOLULU Pacific Trade Center-Ground Floor. 190 South
King St
IOAHO
BOISE 691 S. Capitol Blvd
ILLINOIS
AURORA B90 North Lake St
CHICAGO 4355 S Archer Ave.. CNA Plaza. 309 S. Wabash:
72 West Adams, 524 n. Michigan Ave , 101 W
Washington St al Clark
ELMWOOO PARK 7212 W Grand Ave.
FAIRVIEW HEIGHTS "4 Market Place
HOMEWOOO/GLENWOOO 329 GlenwoorJ Lansing; 18230 S
Halsted at 183rd
JOLIET 2415 W Jetterson St
LaGRANGE One S. LaGrange Rd
UBERTYVILLE 1350 S Milwaukee Ave
LOMBARD 4 Yorktown Center
MDLINE 4401 44th Ave
NILES 8349 Golt Rd
OAK LAWN 4815 W 95th St.
PEORIA 4125 N Sheridan Rd,
ROCKFORD North Town S/C. 3600 N Main St.
SCHAUMBURG 651 Mall Dr
SPRINGFIELD Sherwood Plaza. 2482 Wabash
INDIANA
EVANSVILLE 431 Diamond Ave.
FT. WAYME 747 Northerns! S/C
GRIFFITH 208 W Ridge Rd
HOBART Save More Piaza. Rtes #6 & 51
INDIANAPOLIS 6242 E 82nd St . Castleton Pfe; Speedway
Plaza. 6129 B Crawtordsville. 10013 E Washington St..
Two W. Washington St.
SOUTH BEND 182? South Bend Ave
TERRE HAUTE 3460 U S Hwy 41 S
IOWA
CEDAR RAPIDS m Frrst Ave.. S E I Downtown)
DAVENPORT 616 E Kirrtoly Rd
OES MOINES 7660 Hickman Rd . Sherwood Forest S/M
KANSAS
OVERLAND PARK 8619 W 95th
TOPEKA White Lakes Plaza Wesl Tower, 3715 Plaza Dr
WICHITA 2732 Blvd Plaza S/C
KENTUCKY
FLORENCE 7727 Mall Rd
LEXINGTON 2909 Richmond Rd
LOUISVILLE Louisville Ga«ena. 4133 Shelbyvllle Rd.
LOUISIANA
ALEXANDRIA 1213 Texas Ave
BATON ROUGE 7007 Florida Btvd.
GRETNA JOfl La Patco Blvd.
HOUMA 2343 W Park Ave (Hwy. 24)
LAFAYETTE University Square at Congress Blvd
METAtRIE 3750 Veterans Hwy
NEW ORLEANS 327 St. Charles Ave.
SHREVEPOHT 1545 Line Ave.
MAINE
BANGOR Maine Square
MARYLAND
BALTIMORE 7942 Belair Rd . Putty Hill Plaza. 115 N
Charles SI. at Lexington
BETHESOA 7900 Wisconsin Ave.
CATONSVILLE One Mile West S/C, 6600 B Bait. Nat'l. Pike
FREDERICK Shoppers World, Rt 40W
NEW CARROLLTON-LANHAM 7949 Annapolis Rd
PASADENA 6120 Ritchie Hwy.
ROCKVILLE Congressional Plaza, 1673 Rockvilte Pike
SALISBURY Shoppers World S/C. Rt 50
TEMPLE HILLS 4520 St. Barnabas Rd
TOWSON-LUTHERVILLE VDrktown S/C York Rd at Ridgley
Rd
MASSACHUSETTS
BOSTON 730 Commonwealth Ave., 111 Summer St.
BRAINTREE South Shore Plaza. 250 Granite St.
BROCKTON 675 Belmont
BURLINGTON Crossroads Plaza. Rt 3 S
CAMBRIDGE Harvard Square. 28 Boylston Si.
CHESTNUT HILL 200 Boylston St
NAT1CK 1400 Worcester Rd.
SAUGUS 343 Broadway
SPRINGFIELD 1985 Main St.. Norttigate Plz.
WDHCESTER Lincoln Plaza
MICHIGAN
ANN ARBOR 2515 Jackson Rd
BIRMINGHAM 3620 W Maple Rd
DEARBORN Wesiborn Shop Ctr., 23161 Michigan Ave
DETROIT DWNTN 1559 Woodward Ave
FLINT G3298 Miller Rd., Yorkshire Plaza
GHAND RAPIDS 3142 28tb SI. SE.
KALAMAZOO 25 Kalamazoo Center
LANSING 2519 S Cedar St.
PLAINFIELO North Kent Mall
PONTIAC North Oak Plaza-Pontiac Mall, 2436 Elizabeth Lake
Rd
LIVONIA 33470 W, 7 Mile Rd
ROSEVILLE 31873 Gratiot Ave
SOUTHFIELD 17651 West 12 Mile Rd
TROY Oakland Plaza. 322 John R. Rd
WARREN 29038 Van Dyke Ave
MINNESOTA
BLOOMINGTON 10566 France Ave. S.
FRIDLEY 7974-76 University Ave. North
GOLDEN VALLEY Golden Valley S/C, 8016 Olson Memorial
rkvy
MINNEAPOLIS 330 Marquette Ave.
ST. PAUL 6th S Wabasha
MISSISSIPPI
GULFPORT 5I6A Courthouse Rd.
JACKSON 979 Ellis Ave.
MISSOURI
OES-PERES 11960 Manchester Rd.
FLORISSANT 47 Florissant Oaks S/C
INDEPENDENCE 1325 S Noland Rd
KANSAS CITY 4025 N. Oak TrafflCway
ST. ANN 10472 St. Charles Rock Rd.
ST. LOUIS 500 No Broadway (Commerce Bank Bldg. .
Downtown)
SPRINGFIELD 2684 S Glenstone
NEBRASKA
LINCOLN 4601 ■0" St.
OMAHA 3006 Dodge St.. 1313 72nd St. at Pacific
NEVADA
LAS VEGAS Commercial Center. 953 E Sahara #31-B
RENO 332S Kietzke Lane
Radio Shack
TRS-80 Microcomputer News
PO. Box 2910
Fort Worth, Texas 761 1 3-291
BULK RATE
U.S. POSTAGE
PAID
Radio Shack
A Div. of Tandy Corp.
ADDRESS CHANGE
□ Remove from list
_J Change
as shown
Please detach address label and
mail to address shown above
NEW HAMPSHIRE
MANCHESTER Hampshire Plaza. 1000 Elm Si.
NASHUA 429 Amhersl St . Rl. 101 A
NEW JERSEY
BRIDGE WATER 1472 U S Highway 22 Easl
E BRUNSWICK 595 A Rt 18
E. HANOVER Rt 10. Hanovet Plaza
LAWRENCEVILLE Rt 1 I Texas Ave
NEWARK 595 Broad
NORTH FIELD 322 2- I ion Rd
PARAMUS 175 Rl 17 S
SPRINGFIELD Rt «22 Center Isle
TOMS RIVER 700 Rt 18 West
VOORHEES 35 Eagle Plaza
NEW MEXICO
ALBUOUERQUE 2108 San Mateo NE.
NEW YORK
ALBANY Shoppers Pk., Wolt Rd.
BAYSHORE 1751 Sunrise Hwy
BETHPAGE 422 N Wantagh Ave
BROOKLYN 531 86th St.
BUFFALO 839 Niagara Falls Blvd.
FRESH MEAOOWS 187 12 Horace Harding Exp.
GARDEN CITY 960 franklin Ave
JOHNSON CITY Giant Shopping Center. Harry L Drive
KINGSTON Kings Mall, Rt. 9W
MANHASSET 1550 Northern Blvd.
MELVILLE TSS Man Rt DO
NEWBUHGH Zayre Plaza. Rl. #17K
NEW ROCHELLE 211 North Ave.
NEW YORK 385 Fifth Ave., 139 E. 42nd Si 19 W 23rd St..
347 Madison Ave.. 270 Park Ave Soulh, 12B2 Broadway,
9 Broadway
NIAGARA FALLS Pine Plaza 8351 Niagara Falls Btvd.
REGO PARK 97-77 Queens Blvd
ROCHESTER 3000 Wmton Rd.
SCARSDALE 365 Central Paik Ave
SCHENECTADY Woad'awn Piaffl
SPRING VALLEY White House Center. 88 W Rt. 59
STATEN ISLAND 2409 Richmond Ave
SYRACUSE 2544 Erie Blvd : Hotel Syracuse. 510 S. Warren
UTICA Riverside Mall
VALLEY STREAM Green Acres Shop Ctr
YONKERS Cross Country Shop. Ctr.
NORTH CAROLINA
ASHEVILLE K Mart Shopping Center. Tunnel Rd.
CHARLOTTE 3732 Independence Blvd.. Tyvola Mall. 5401
South Blvd.
DURHAM South Square Mall
FAYETTEVILLE Eulaw Shopping Center, 815 Elm Si
GREENSBORO 371B High Point Rd.
RALEtGH Townridge Sq . Hwy 70 W
WILMINGTON hMDi^de-ce Mai!
WINSTON-SALEM 629 Peters Creek Pkwy.
OHIO
AKRON Fainawn Plaza. 2727 W Market St
BEDFORD HEIGHTS 5217 Northfield Rd
CANTON 5248 Dressier Rd NW . Mellet Plaza. 3B26 W
Tuscarawas,
CENTERVILLE 2025 Miamisdurg-Centerville Rd
CINCINNATI 9725 Montgomery; 16-18 Convention Way (on
Skywalk)
CLEVELAND 419 Euclid (Dwntwn): 275S1 Euclid Ave.
COLUMBUS B52 S Hamilton, Greal Eastern S/C; Tne Patio
Shop. Ctr , 4661 Karl Rd.; 400 N High St
DAYTON Northwesl Plaza, 3279 Wesl Siehenthaler
ELYRIA 285 Midway Blvd
FAIRFIELD 7255 Dixie Hwy (V< Mi. North ol I- 275)
NORTH OLMSTED Great Northern S/C
PARMA 7551 W RidgewoOd Dr
TOLEDO 5844 W Central Ave.. Brownstone Plaza. 1724 S
Reynolds Rd.
YOUNGSTOWN Union Square Plaza. 2543 Belmont Ave
OKLAHOMA
OKLAHOMA CITY 4732 SE 29th Si . Sprmgdale S/C. 4469
NWSOth, 1101 SW59th Si
TULSA 7218 & 7220 E. 41st St.
OREGON
EUGENE 390 CoPurg Rd.
PORTLAND 7463 SW Barbur Blvd , 9131 SE Powell. 3rd and
Washington Sts (Downtown)
SALEM Salem Plaza. 403 Center
PENNSYLVANIA
ALLENTOWN Crest Plaza S/C, Cedar Crest Blvd LIS 22
BALA CYNWYD 67 E City Line Ave.
EASTON 25th Si Shopping Center
ELKIN5 PARK Elkins Park Square. BOB Old York Rd.
ERIE 5755 Peach St
HARRISBURG Union Deposit Mall. Union Deposit Rd #17
LANCASTER Park City Plaza. US 30
MONROEVILLE 3828 Wm. Penn. Hwy.
MONTGOMERYVILLE foroort Sq Rt. 309
PHILADELPHIA 7542 Castor Ave.; 1002 Chestnut Si.. 1801
Market St.. 10 Penn Center
PENNSYLVANIA
YORK York Counly Shopping Center
PITTSBURGH 5775 Baptist Ha , Hills Pfaza. 303 Smithfield
St 4643 Baum Blvd ; 4768 McKnigtil fld.
SCRANTON 206 Meadow Ave
WYOMISSING Berkshire Mall West, 1101 Woodland fld
PUERTO RICO
HATO REY 243 Franklin Roosevelt Ave
RHODE ISLAND
E. PROVIDENCE 850 Waierman Ave
PROVIDENCE 177 Union Si
SOUTH CAROLINA
COLUMBIA Old Sears Bldg.. 1001 Harden St.
GREENVILLE N Hills S/C
N. CHARLESTON 5900 Rivers Ave
SOUTH DAKOTA
SIOUX FALLS 1700 S Minnesota al 25th
TENNESSEE
CHATTANOOGA 636 Northgate Mali
JOHNSON CITY Peerless Center
KNOXVILLE Cedar Blut) S/C. 9123 Executive Park Dr
MEMPHIS 4655 American Way, 1997 Union Ave.
NASHVILLE 2115 Franklin Pike. Rmergate Plaza
TEXAS
AMARILLO Wellington So. S/C, 1619 S Kentucky
ARLINGTON 2500 E Randol Mill. Suite 113
AUSTIN 8764 E Research Blvd.. Southwood Mall. 1501 Ben
White Blvd
BROWNSVILLE 1639 Price Rd (Hwy. 77)
BEAUMONT 5330 Easlex Frwy.
COLLEGE STATION 2414 Texas Ave Soulh
CORPUS CHRISTI 1711 S Staple St
DALLAS 15340 Dallas Pkwy . Suite 1100, 2930 W
Northwesl Hwy .1517 Main St . 2588 floyaJ Ln
EL PASO 9515 Gateway Wesl, Kern Plaza Shopping Center,
3100 N. Mesa
FT. WORTH 23 1 One Tandy Center 2801 Alia Mere
GALVESTON 5924 Broadway
HARLINGEN 1514 S. Hwy 77. Sunshine Strip
HUMBLE 19300 B" Hwy. 59 (at FM 1960)
HOUSTON 21TC-FM 1960; 10543 Gult Fwy , 5900 North
Fwy ; 6813 SW Fwy ; 809 Dallas St., Holland Square
Center. 10920 East Freeway. (713) 453-0800; Champion
Forest Plaza. Champion Forest Dr and FM. 1960 West:
1018 Gessner. 3278 South Loop West (So Main al 610)
HURST Northeast Mall
LAREDO 102 East Calton Rd
LUBBOCK 3625 34th St
ODESSA 16131 'A" Easl 8th Street
RICHARDSON Fleetwood Sq. S/C. 202 W Campbell Rd.;
320 S. Central Expr.
SAN ANTONIO 6018 Wesl Ave,. 4249 Cemergate; Rrveroend
Parking Garage, 211 W Market St (Downiown)
WICHITA FALLS 1720-A 9th St
UTAH
OGDEN K-Mart Shopping Center, 3672 Wall Ave.
OREM Grand Central Plaza, 384 East & 1300 South
MUHHAY 6051 S State Ave
SALT LAKE CITY 301 South State St
VIRGINIA
ALEXANDRIA 3425 King St. at Ouaker Ln.
ARLINGTON Crystal Cily, 2301 So, Jefferson Davis Hwy.
FAIRFAX Westfair Center. 1 1027 tee Hwy.
LYNCHBURG Hilts Plaza, Ward's Rd
NEWPORT NEWS Newmarket South Shop Ctr
NORFOLK 5731 Poplar Hall Dr.. Wards Corner, 122 E Little
Creek Rd
RICHMOND Willow Lawn S/C. 1617 Willow Lawn Dr , 7728
Midlothian Turnpike
ROANOKE Franklin Bldg.. 3561 Franklin Rd S.W.
ROSSLYN 1911 N Fi Myer Dr at Rl 29
WASHINGTON
BELLEVUE Crossroads Mall. North Easl Bth & 156 St
BELLINGHAM 1111 Cornwall Ave.. Suite B & C
FEDERAL WAY 33505 Pacific Hwy South
OLYMPIA 106 N Wilson
SEATTLE 16405 Aurora Ave N., 1521 3rd Ave , 5030
Roosevelt Way N£
SPOKANE 7702 N. Division; E 12412 Sprague
TACOMA 7030 S Sprague
TUKWILA 15425 53rd Ave S
YAKIMA 1111 N. First St.
WEST VIRGINIA
HUNTINGTON 2701% 5th Ave
WISCONSIN
APPLETON 2310 West College Ave
MAOISON 57 Wesl Towne Mall
MILWAUKEE 6450 N 76th St. 729 N Milwaukee
(Downtown)
WEST ALUS 2717 South 108th St